]> git.pld-linux.org Git - packages/nfs-utils.git/blobdiff - nfs-utils-mount-fake.patch
- updated to 1.1.0-rc1
[packages/nfs-utils.git] / nfs-utils-mount-fake.patch
index e1bcd0d1fa6e277370f022ba565b364005a3c735..4fcc613f95610dc2d6c5a05c72186013a745147b 100644 (file)
@@ -1,35 +1,53 @@
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
-
---- nfs-utils-1.0.10/utils/mount/mount.c.kzak  2007-02-09 12:26:16.000000000 +0100
-+++ nfs-utils-1.0.10/utils/mount/mount.c       2007-02-09 12:27:59.000000000 +0100
-@@ -494,20 +494,21 @@
-                                       &extra_opts, &mount_opts,  0);
-               }
+--- nfs-utils-1.1.0-rc1/utils/mount/mount.c~   2007-03-29 05:55:33.000000000 +0200
++++ nfs-utils-1.1.0-rc1/utils/mount/mount.c    2007-04-05 18:58:38.000000000 +0200
+@@ -508,30 +508,30 @@
+           }
        }
--      if (fake)
--              return 0;
-       if (mnt_err)
-               exit(EX_FAIL);
  
--      mnt_err = do_mount_syscall(spec, mount_point,
--                      nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
+-      if (nfs_mount_vers == 4)
+-              mnt_err = nfs4mount(spec, mount_point, &flags, &extra_opts, &mount_opts, 0);
+-      else {
+-              int need_statd = 0;
+-              mnt_err = nfsmount(spec, mount_point, &flags,
+-                                 &extra_opts, &mount_opts,
+-                                 0, &need_statd);
+-              if (!mnt_err && !fake && need_statd) {
+-                      if (!start_statd()) {
+-                              fprintf(stderr,
+-                                      "%s: rpc.statd is not running but is "
+-                                      "required for remote locking\n"
+-                                      "   Either use \"-o nolocks\" to keep "
+-                                      "locks local, or start statd.\n",
+-                                      progname);
+-                              exit(1);
 +      if (!fake) {
-+              mnt_err = do_mount_syscall(spec, mount_point,
-+                              nfs_mount_vers == 4 ? "nfs4" : "nfs", 
-+                              flags, mount_opts);
++              if (nfs_mount_vers == 4)
++                      mnt_err = nfs4mount(spec, mount_point, &flags, &extra_opts, &mount_opts, 0);
++              else {
++                      int need_statd = 0;
++                      mnt_err = nfsmount(spec, mount_point, &flags,
++                                         &extra_opts, &mount_opts,
++                                         0, &need_statd);
++                      if (!mnt_err && need_statd) {
++                              if (!start_statd()) {
++                                      fprintf(stderr,
++                                              "%s: rpc.statd is not running but is "
++                                              "required for remote locking\n"
++                                              "   Either use \"-o nolocks\" to keep "
++                                              "locks local, or start statd.\n",
++                                              progname);
++                                      exit(1);
++                              }
+                       }
+               }
+-      }
  
--      if(mnt_err) {
--              mount_error(mount_point);
+-      if (mnt_err)
 -              exit(EX_FAIL);
-+              if (mnt_err) {
-+                      mount_error(mount_point);
++              if (mnt_err)
 +                      exit(EX_FAIL);
-+              }
-       }
  
--      if(!nomtab) {
-+      if (!nomtab) {
-               add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
-                        flags, extra_opts, 0, 0);
-       }
+-      if (!fake) {
+               mnt_err = do_mount_syscall(spec, mount_point,
+                                          nfs_mount_vers == 4 ? "nfs4" : "nfs",
+                                          flags & ~(MS_USER|MS_USERS) ,
This page took 0.029541 seconds and 4 git commands to generate.