[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Mon May 7 15:04:36 UTC 2007


 parted/parted.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a8bfdca7c90a936dcf689bc54d5b098b84dc630
Author: Jim Meyering <jim at meyering.net>
Date:   Mon May 7 16:45:27 2007 +0200

    Suppress "you are not superuser..." warning in script mode.
    * parted/parted.c (_init): Do not emit this warning in script mode:
    "You are not superuser.  Watch out for permissions."

diff --git a/parted/parted.c b/parted/parted.c
index 3c4aedd..385974d 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -2407,7 +2407,7 @@ if (!_parse_options (argc_ptr, argv_ptr))
         goto error_done_commands;
 
 #ifdef HAVE_GETUID
-        if (getuid() != 0) {
+        if (getuid() != 0 && !opt_script_mode) {
             puts (_("WARNING: You are not superuser.  Watch out for "
                     "permissions."));
         }



More information about the Parted-commits mailing list