git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2051 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -1,36 +0,0 @@ |
|||
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
# |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# Please add additional copyright information _after_ the line containing |
|||
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
# |
|||
# ROCK Linux: rock-src/package/base/kiss/mount_typo.patch |
|||
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 2 of the License, or |
|||
# (at your option) any later version. A copy of the GNU General Public |
|||
# License can be found at Documentation/COPYING. |
|||
# |
|||
# Many people helped and are helping developing ROCK Linux. Please |
|||
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
# file for details. |
|||
# |
|||
# --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
it's pretty weird to mount a directory at a device |
|||
- Alejandro |
|||
|
|||
--- ./domount.c.orig 2003-10-25 00:03:15.000000000 -0300
|
|||
+++ ./domount.c 2003-10-25 09:51:03.000000000 -0300
|
|||
@@ -51,7 +51,7 @@
|
|||
|
|||
if (mount (s.str [optind], s.str [optind + 1], type, 1, 0)) |
|||
error ("problem mounting \"%s\" on \"%s\" (type \"%s\")", |
|||
- s.str [optind + 1], s.str [optind], type);
|
|||
+ s.str [optind], s.str [optind + 1], type);
|
|||
|
|||
if (! (mtab = fopen (MTAB, "a")) ) |
|||
return (warning ("\"%s\" not updated", MTAB)); |
@ -0,0 +1,56 @@ |
|||
--- src/domount.c 1998-09-25 14:07:09.000000000 +0200
|
|||
+++ src/domount.c 2003-12-24 16:16:17.000000000 +0100
|
|||
@@ -2,27 +2,34 @@
|
|||
|
|||
int domount (Stringstack s) |
|||
{ |
|||
- register int
|
|||
- opt;
|
|||
- register char
|
|||
- *type = NULL;
|
|||
+ int opt;
|
|||
+ char *type = NULL;
|
|||
+ int mount_opt = 0;
|
|||
|
|||
- while ( (opt = getopt (s.nstr, s.str, "t:h")) != -1 )
|
|||
+ while ( (opt = getopt (s.nstr, s.str, "t:hrR")) != -1 )
|
|||
switch (opt) |
|||
{ |
|||
case 't': |
|||
if (! (type = optarg)) |
|||
error ("missing type after \"-t\""); |
|||
break; |
|||
+ case 'r':
|
|||
+ mount_opt |= MS_RDONLY;
|
|||
+ break;
|
|||
+ case 'R':
|
|||
+ mount_opt |= MS_REMOUNT;
|
|||
+ break;
|
|||
default: |
|||
case 'h': |
|||
error ("Bad commandline.\n" |
|||
"Usage: %s\n" |
|||
- " or: %s [-t type] [-r] device directory\n"
|
|||
+ " or: %s [-t type] [-r] [-R] device directory\n"
|
|||
"Where:\n" |
|||
" -t type : mount as type, e.g. ext2, minix\n" |
|||
" device : device to mount\n" |
|||
" directory : mount point\n" |
|||
+ " -r : mount read-only\n"
|
|||
+ " -R : remount\n"
|
|||
, progname, progname); |
|||
} |
|||
|
|||
@@ -49,9 +56,9 @@
|
|||
if (! type) |
|||
error ("need \"-t type\" specification"); |
|||
|
|||
- if (mount (s.str [optind], s.str [optind + 1], type, 1, 0))
|
|||
- error ("problem mounting \"%s\" on \"%s\" (type \"%s\")",
|
|||
- s.str [optind + 1], s.str [optind], type);
|
|||
+ if (mount (s.str [optind], s.str [optind + 1], type, mount_opt, 0))
|
|||
+ error ("problem mounting \"%s\" on \"%s\" (type \"%s\", opts \"%x\")",
|
|||
+ s.str [optind], s.str [optind + 1], type, mount_opt);
|
|||
|
|||
if (! (mtab = fopen (MTAB, "a")) ) |
|||
return (warning ("\"%s\" not updated", MTAB)); |