Hi,

At Sun, 9 Jul 2000 20:04:16 +0200,
Wilko Bulte <[EMAIL PROTECTED]> wrote:
> > >> I really don't understand why the cd9660 filesystem needs to whine about the
> > >> RockRidge extensions everytime one mounts a RR cdrom. 
> > > The right solution would be return this
> > > information upon request through some mean. 
> Wouldn't it be possible to display this when one types 'mount'?

technically possible,
but there is few room on the bit fields for this purpose.

see <sys/mount.h>

MNT_* are defined for mnt_flag in struct mount,
its unused fields are only 4bits (0x0f000000).
yes, 4bits are enough for representing extension types,
however, this is the limited resource.

if extending mnt_flag to 64bit is allowed in future, we shall go ahead.

and sample implementation is attached

-- 
Motomichi Matsuzaki <[EMAIL PROTECTED]> 
Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan 
--- sys/isofs/cd9660/cd9660_vfsops.c.original   Thu Jun 29 12:06:16 2000
+++ sys/isofs/cd9660/cd9660_vfsops.c    Mon Jul 10 03:45:36 2000
@@ -469,6 +469,7 @@
 
        if (high_sierra) {
                /* this effectively ignores all the mount flags */
-               log(LOG_INFO, "cd9660: High Sierra Format\n");
                isomp->iso_ftype = ISO_FTYPE_HIGH_SIERRA;
        } else
                switch (isomp->im_flags&(ISOFSMNT_NORRIP|ISOFSMNT_GENS)) {
@@ -479,7 +480,7 @@
                          isomp->iso_ftype = ISO_FTYPE_9660;
                          break;
                  case 0:
-                         log(LOG_INFO, "cd9660: RockRidge Extension\n");
+                         mp->mnt_flag |= MNT_ROCKRIDGE;
                          isomp->iso_ftype = ISO_FTYPE_RRIP;
                          break;
                }
@@ -487,7 +488,7 @@
        /* Decide whether to use the Joliet descriptor */
 
        if (isomp->iso_ftype != ISO_FTYPE_RRIP && joliet_level) {
-               log(LOG_INFO, "cd9660: Joliet Extension\n");
+               mp->mnt_flag |= MNT_JOLIET;
                rootp = (struct iso_directory_record *)
                        sup->root_directory_record;
                bcopy (rootp, isomp->root, sizeof isomp->root);
--- sys/sys/mount.h.original    Wed Jul  5 06:02:16 2000
+++ sys/sys/mount.h     Mon Jul 10 03:52:07 2000
@@ -152,6 +152,12 @@
 #define        MNT_EXPUBLIC    0x20000000      /* public export (WebNFS) */
 
 /*
+ * cd9660 related flags.
+ */
+#define MNT_ROCKRIDGE  0x01000000
+#define MNT_JOLIET     0x02000000
+
+/*
  * Flags set by internal operations,
  * but visible to the user.
  * XXX some of these are not quite right.. (I've never seen the root flag set)
@@ -171,6 +177,7 @@
                        MNT_NOSUID      | MNT_NODEV     | MNT_UNION     | \
                        MNT_ASYNC       | MNT_EXRDONLY  | MNT_EXPORTED  | \
                        MNT_DEFEXPORTED | MNT_EXPORTANON| MNT_EXKERB    | \
+                       MNT_ROCKRIDGE   | MNT_JOLIET    | \
                        MNT_LOCAL       | MNT_USER      | MNT_QUOTA     | \
                        MNT_ROOTFS      | MNT_NOATIME   | MNT_NOCLUSTERR| \
                        MNT_NOCLUSTERW  | MNT_SUIDDIR   | MNT_SOFTDEP   | \
--- sbin/mount/mount.c.original Sat Jan 15 23:28:13 2000
+++ sbin/mount/mount.c  Mon Jul 10 04:45:30 2000
@@ -92,6 +92,8 @@
        const char *o_name;
 } optnames[] = {
        { MNT_ASYNC,            "asynchronous" },
+       { MNT_ROCKRIDGE,        "RockRidge extension" },
+       { MNT_JOLIET,           "Joliet extension" },
        { MNT_EXPORTED,         "NFS exported" },
        { MNT_LOCAL,            "local" },
        { MNT_NOATIME,          "noatime" },

Reply via email to