1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../kiss/mount_typo_features.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 It's pretty weird to mount a directory at a device
20 And a implemented 'read-only' mount option is even nicer - as well
21 as a remount possibility in rescue conditions ;-)
23 - Rene Rebe <rene@exactcode.de>
25 --- ./src/domount.c 1998-09-25 14:07:09.000000000 +0200
26 +++ ./src/domount.c 2003-12-24 16:16:17.000000000 +0100
29 int domount (Stringstack s)
39 - while ( (opt = getopt (s.nstr, s.str, "t:h")) != -1 )
40 + while ( (opt = getopt (s.nstr, s.str, "t:hrR")) != -1 )
44 if (! (type = optarg))
45 error ("missing type after \"-t\"");
48 + mount_opt |= MS_RDONLY;
51 + mount_opt |= MS_REMOUNT;
55 error ("Bad commandline.\n"
57 - " or: %s [-t type] [-r] device directory\n"
58 + " or: %s [-t type] [-r] [-R] device directory\n"
60 " -t type : mount as type, e.g. ext2, minix\n"
61 " device : device to mount\n"
62 " directory : mount point\n"
63 + " -r : mount read-only\n"
65 , progname, progname);
70 error ("need \"-t type\" specification");
72 - if (mount (s.str [optind], s.str [optind + 1], type, 1, 0))
73 - error ("problem mounting \"%s\" on \"%s\" (type \"%s\")",
74 - s.str [optind + 1], s.str [optind], type);
75 + if (mount (s.str [optind], s.str [optind + 1], type, mount_opt, 0))
76 + error ("problem mounting \"%s\" on \"%s\" (type \"%s\", opts \"%x\")",
77 + s.str [optind], s.str [optind + 1], type, mount_opt);
79 if (! (mtab = fopen (MTAB, "a")) )
80 return (warning ("\"%s\" not updated", MTAB));