* conf/umount/umount_linux.c (umount_fs): Linux doesn't need the
authorIon Badulescu <ib42@cs.columbia.edu>
Mon, 17 Jan 2005 19:31:54 +0000 (19:31 +0000)
committerIon Badulescu <ib42@cs.columbia.edu>
Mon, 17 Jan 2005 19:31:54 +0000 (19:31 +0000)
autofs space hack

* conf/umount/umount_default.c (umount_fs): there is no need for
HAVE_LOOP_DEV, now that Linux has its own dedicated umount_linux.c

ChangeLog
conf/umount/umount_default.c
conf/umount/umount_linux.c

index f8411469cbb63a9d30978b264d9fb73e3e659a8b..b9c2775ad0c99f8f8671075d1e65a36052ce9729 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-17  Ion Badulescu  <ionut@moisil.badula.org>
+
+       * conf/umount/umount_linux.c (umount_fs): Linux doesn't need the
+       autofs space hack
+
+       * conf/umount/umount_default.c (umount_fs): there is no need for
+       HAVE_LOOP_DEV, now that Linux has its own dedicated umount_linux.c
+
 2005-01-17  Erez Zadok  <ezk@cs.sunysb.edu>
 
        * doc/am-utils.texi (Automatic Unmounting): document new umount2()
index 7c253d5fb5ac12e0ab1df8982d7eb4dcdd7db6ac..3bd0572da9679da56a90a6e279a7c890d3122f31 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: umount_default.c,v 1.13 2005/01/03 20:56:45 ezk Exp $
+ * $Id: umount_default.c,v 1.14 2005/01/17 19:31:54 ib42 Exp $
  *
  */
 
@@ -118,22 +118,6 @@ umount_fs(char *mntdir, const char *mnttabname, int on_autofs)
     dlog("Finished unmount(%s)", mp_save->mnt->mnt_dir);
 
     if (!error) {
-#ifdef HAVE_LOOP_DEVICE
-      /* look for loop=/dev/loopX in mnt_opts */
-      char *opt;
-      char loopstr[] = "loop=";
-      char *loopdev;
-      for (opt = strtok(mp_save->mnt->mnt_opts, ","); opt; opt = strtok(NULL, ","))
-       if (NSTREQ(opt, loopstr, sizeof(loopstr) - 1)) {
-         loopdev = opt + sizeof(loopstr) - 1;
-         if (delete_loop_device(loopdev) < 0)
-           plog(XLOG_WARNING, "unmount() failed to release loop device %s: %m", loopdev);
-         else
-           plog(XLOG_INFO, "unmount() released loop device %s OK", loopdev);
-         break;
-       }
-#endif /* HAVE_LOOP_DEVICE */
-
 #ifdef MOUNT_TABLE_ON_FILE
       free_mntlist(mlist);
       mp = mlist = read_mtab(mntdir, mnttabname);
index 0b1068f45f33903a53a6d933eb557bc719e3fea6..8184cb9dd8a3dea37e052214f865d14289f37bdc 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: umount_linux.c,v 1.1 2005/01/17 06:00:41 ezk Exp $
+ * $Id: umount_linux.c,v 1.2 2005/01/17 19:31:54 ib42 Exp $
  *
  */
 
@@ -83,16 +83,7 @@ umount_fs(char *mntdir, const char *mnttabname, int on_autofs)
     unlock_mntlist();
 #endif /* MOUNT_TABLE_ON_FILE */
 
-#ifdef NEED_AUTOFS_SPACE_HACK
-    if (on_autofs) {
-      char *mnt_dir_save = mp_save->mnt->mnt_dir;
-      mp_save->mnt->mnt_dir = autofs_strdup_space_hack(mnt_dir_save);
-      error = UNMOUNT_TRAP(mp_save->mnt);
-      XFREE(mp_save->mnt->mnt_dir);
-      mp_save->mnt->mnt_dir = mnt_dir_save;
-    } else
-#endif /* NEED_AUTOFS_SPACE_HACK */
-      error = UNMOUNT_TRAP(mp_save->mnt);
+    error = UNMOUNT_TRAP(mp_save->mnt);
     if (error < 0) {
       switch (error = errno) {
       case EINVAL: