From 531d0b38e3cafe70b14c8dd04a1e7ad732431908 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Wed, 24 Dec 2003 15:38:30 +0000 Subject: [PATCH] implemented kiss' mount '-r' options and added a remount option ('-R') git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2051 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 4 ++ package/base/kiss/mount_typo.patch | 36 ------------- package/base/kiss/mount_typo_features.patch | 56 +++++++++++++++++++++ 3 files changed, 60 insertions(+), 36 deletions(-) delete mode 100644 package/base/kiss/mount_typo.patch create mode 100644 package/base/kiss/mount_typo_features.patch diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 8a3e8064a..2e6bc7dc5 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -1,4 +1,8 @@ +*) 2003-12-24 (2.0.0-rc3 - 2.0.0-rc4) + + - implemented kiss' mount '-r' options and added a remount option ('-R') + *) 2003-12-23 (2.0.0-rc3 - 2.0.0-rc4) - added kdirstat (2.4.0) diff --git a/package/base/kiss/mount_typo.patch b/package/base/kiss/mount_typo.patch deleted file mode 100644 index 3260acec9..000000000 --- a/package/base/kiss/mount_typo.patch +++ /dev/null @@ -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)); diff --git a/package/base/kiss/mount_typo_features.patch b/package/base/kiss/mount_typo_features.patch new file mode 100644 index 000000000..ccfa40fcb --- /dev/null +++ b/package/base/kiss/mount_typo_features.patch @@ -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));