aboutsummaryrefslogtreecommitdiffstats
path: root/misc/tune2fs.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-04-26 14:00:26 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-04-26 14:00:26 +0000
commita418d3ad819323f871005d253f7f9ac378e78ba5 (patch)
treebcc26141c6ec23de4bce9cd886a1d085c08a1b69 /misc/tune2fs.c
parent50e1e10fa0ac12a3e2a9d20a75ee9041873cda96 (diff)
downloadandroid_external_e2fsprogs-a418d3ad819323f871005d253f7f9ac378e78ba5.tar.gz
android_external_e2fsprogs-a418d3ad819323f871005d253f7f9ac378e78ba5.tar.bz2
android_external_e2fsprogs-a418d3ad819323f871005d253f7f9ac378e78ba5.zip
Many files:
Checked in e2fsprogs 0.5c
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r--misc/tune2fs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index cd2d622a..1576ce44 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -24,7 +24,9 @@
#include <fcntl.h>
#include <grp.h>
+#ifdef HAVE_GETOPT_H
#include <getopt.h>
+#endif
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -120,8 +122,10 @@ void main (int argc, char ** argv)
gr = getgrnam (optarg);
if (gr == NULL)
tmp = optarg;
- else
+ else {
resgid = gr->gr_gid;
+ *tmp =0;
+ }
}
if (*tmp)
{
@@ -194,8 +198,10 @@ void main (int argc, char ** argv)
pw = getpwnam (optarg);
if (pw == NULL)
tmp = optarg;
- else
+ else {
resuid = pw->pw_uid;
+ *tmp = 0;
+ }
}
if (*tmp)
{