]> git.pld-linux.org Git - packages/nfs-utils.git/blob - nfs-utils-mount-fake.patch
- fixed the fake fix from Fedora :/
[packages/nfs-utils.git] / nfs-utils-mount-fake.patch
1 --- nfs-utils-1.0.12/utils/mount/mount.c~       2007-03-22 14:43:13.000000000 +0100
2 +++ nfs-utils-1.0.12/utils/mount/mount.c        2007-03-22 14:45:06.000000000 +0100
3 @@ -492,30 +492,31 @@
4                 }
5         }
6  
7 -       if (nfs_mount_vers == 4) {
8 -               mnt_err = nfs4mount(spec, mount_point, &flags, 
9 -                       &extra_opts, &mount_opts, 0);
10 -       }
11 -       else {
12 -               if (!strcmp(progname, "mount.nfs")) {
13 -                       mnt_err = nfsmount(spec, mount_point, &flags,
14 -                                       &extra_opts, &mount_opts,  0);
15 +       if (!fake) {
16 +               if (nfs_mount_vers == 4) {
17 +                       mnt_err = nfs4mount(spec, mount_point, &flags, 
18 +                               &extra_opts, &mount_opts, 0);
19 +               }
20 +               else {
21 +                       if (!strcmp(progname, "mount.nfs")) {
22 +                               mnt_err = nfsmount(spec, mount_point, &flags,
23 +                                               &extra_opts, &mount_opts,  0);
24 +                       }
25 +               }
26 +
27 +               if (mnt_err)
28 +                       exit(EX_FAIL);
29 +
30 +               mnt_err = do_mount_syscall(spec, mount_point,
31 +                               nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
32 +
33 +               if(mnt_err) {
34 +                       mount_error(mount_point);
35 +                       exit(EX_FAIL);
36                 }
37 -       }
38 -       if (fake)
39 -               return 0;
40 -       if (mnt_err)
41 -               exit(EX_FAIL);
42 -
43 -       mnt_err = do_mount_syscall(spec, mount_point,
44 -                       nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
45 -
46 -       if(mnt_err) {
47 -               mount_error(mount_point);
48 -               exit(EX_FAIL);
49         }
50  
51 -       if(!nomtab) {
52 +       if (!nomtab) {
53                 add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
54                          flags, extra_opts, 0, 0);
55         }
This page took 0.037854 seconds and 4 git commands to generate.