[3499] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

ziptool patch for DEVFS

daemon@ATHENA.MIT.EDU (Mr LEROY christophe)
Tue Mar 10 11:55:43 1998

From: Mr LEROY christophe <leroy@meg.fr>
Date: 	Mon 09 Mar 14:25:24 1998 (MET)
To: Mirko.Kraft@ixos.de
Cc: linux-scsi@vger.rutgers.edu

Here is a patch on ziptool-1.2 to let you force kernel to reread partition table
on a zip
to make kernel add new /dev/sd/c0b0t6u0p* to be able to mount new zip partitions

christophe leroy

diff -urN ziptool-1.2/README ziptool-1.2.new/README
--- ziptool-1.2/README  Fri Jun 27 11:07:35 1997
+++ ziptool-1.2.new/README      Mon Mar  9 14:17:58 1998
@@ -112,6 +112,13 @@
 4. Change Log
 -------------
 
+Version 1.2a 09/03/98 (Christophe Leroy)
+-------------------------------
+-> Added option -d to reread partition table to make new partitions entries
+   appear in DEVFS filesystem
+-> Fixed a bug which made ziptool unusable when you had a ncpfs partition 
+   mounted
+
 Version 1.2 06/24/97 (Mirko Kraft)
 ----------------------------------
 -> Created a README file.
diff -urN ziptool-1.2/ziptool.c ziptool-1.2.new/ziptool.c
--- ziptool-1.2/ziptool.c       Fri Jun 27 10:21:18 1997
+++ ziptool-1.2.new/ziptool.c   Mon Mar  9 14:14:00 1998
@@ -5,6 +5,7 @@
  *                     based on work of Itai Nahshon
  * (c) 1996   jaztool  Bob Willmot (bwillmot@cnct.com)
  * (c) 1997   Mirko Kraft (Mirko.Kraft@ixos.de)
+ *  modified 1998 Christophe Leroy (leroy@ensea.fr)
  *
  *
  * This program is free software; you can redistribute it and/or
@@ -44,6 +45,12 @@
 #ifndef MNTTYPE_AUTO
 #define MNTTYPE_AUTO                   "auto"
 #endif
+#ifndef MNTTYPE_NCPFS
+#define MNTTYPE_NCPFS                  "ncpfs"
+#endif
+#ifndef MNTTYPE_DEVFS
+#define MNTTYPE_DEVFS                   "devfs"
+#endif
 #ifndef IOMEGA_GET_PROT_MODE           /* patched kernels know this */
 #define IOMEGA_GET_PROT_MODE           0x06
 #define IOMEGA_SET_PROT_MODE           0x0c
@@ -160,7 +167,9 @@
                if (!strcmp (mnt->mnt_type, MNTTYPE_NFS)
                ||  !strcmp (mnt->mnt_type, MNTTYPE_PROC)
                ||  !strcmp (mnt->mnt_type, MNTTYPE_AUTO)
-               ||  !strcmp (mnt->mnt_type, MNTTYPE_IGNORE))
+               ||  !strcmp (mnt->mnt_type, MNTTYPE_IGNORE)
+               ||  !strcmp (mnt->mnt_type, MNTTYPE_NCPFS)
+               ||  !strcmp (mnt->mnt_type, MNTTYPE_DEVFS))
                        continue;
 
                if (stat (mnt->mnt_fsname, &st_mnt)) {
@@ -627,10 +636,11 @@
        (void) fprintf (stderr,
                "usage: %s -e  <dev>   eject disk\n"
                "       %s -s  <dev>   report protection status\n"
+               "       %s -d  <dev>   force kernel to reread partition table\n"
                "       %s -ro <dev>   make disk read only\n"
                "       %s -rp <dev>   make disk read only with password\n"
                "       %s -rw <dev>   make disk full accessible\n\n",
-               progname, progname, progname, progname, progname);
+               progname, progname, progname, progname, progname, progname);
 }
 
 
@@ -689,6 +699,8 @@
                                result = jazip_set_mode (jazipfd,
IOMEGA_PROTECTION_MODE_ROPW);
                        else if (!strcmp (argv[1], "-rw"))
                                result = jazip_set_mode (jazipfd,
IOMEGA_PROTECTION_MODE_RW);
+                       else if (!strcmp (argv[1], "-d"))
+                               result = ioctl (jazipfd, BLKRRPART);
                        else
                                jazip_usage (progname);


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post