summaryrefslogtreecommitdiff
path: root/src/mkdir.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-22 18:56:06 +0200
committerJim Meyering <meyering@redhat.com>2009-08-25 09:21:00 +0200
commit5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 (patch)
treee460d471f37f0dce1ba06f60f88114d1a65326c4 /src/mkdir.c
parent2bc0f3caaafeb240cdcfd050b7ad1fe0ad14addf (diff)
downloadcoreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.gz
global: convert indentation-TABs to spaces
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'src/mkdir.c')
-rw-r--r--src/mkdir.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/mkdir.c b/src/mkdir.c
index 17e1df5b8..4ae487593 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -51,7 +51,7 @@ usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
+ program_name);
else
{
printf (_("Usage: %s [OPTION]... DIRECTORY...\n"), program_name);
@@ -129,10 +129,10 @@ process_dir (char *dir, struct savewd *wd, void *options)
{
struct mkdir_options const *o = options;
return (make_dir_parents (dir, wd, o->make_ancestor_function, options,
- o->mode, announce_mkdir,
- o->mode_bits, (uid_t) -1, (gid_t) -1, true)
- ? EXIT_SUCCESS
- : EXIT_FAILURE);
+ o->mode, announce_mkdir,
+ o->mode_bits, (uid_t) -1, (gid_t) -1, true)
+ ? EXIT_SUCCESS
+ : EXIT_FAILURE);
}
int
@@ -159,24 +159,24 @@ main (int argc, char **argv)
while ((optc = getopt_long (argc, argv, "pm:vZ:", longopts, NULL)) != -1)
{
switch (optc)
- {
- case 'p':
- options.make_ancestor_function = make_ancestor;
- break;
- case 'm':
- specified_mode = optarg;
- break;
- case 'v': /* --verbose */
- options.created_directory_format = _("created directory %s");
- break;
- case 'Z':
- scontext = optarg;
- break;
- case_GETOPT_HELP_CHAR;
- case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
- default:
- usage (EXIT_FAILURE);
- }
+ {
+ case 'p':
+ options.make_ancestor_function = make_ancestor;
+ break;
+ case 'm':
+ specified_mode = optarg;
+ break;
+ case 'v': /* --verbose */
+ options.created_directory_format = _("created directory %s");
+ break;
+ case 'Z':
+ scontext = optarg;
+ break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+ default:
+ usage (EXIT_FAILURE);
+ }
}
if (optind == argc)
@@ -187,8 +187,8 @@ main (int argc, char **argv)
if (scontext && setfscreatecon (scontext) < 0)
error (EXIT_FAILURE, errno,
- _("failed to set default file creation context to %s"),
- quote (scontext));
+ _("failed to set default file creation context to %s"),
+ quote (scontext));
if (options.make_ancestor_function || specified_mode)
{
@@ -197,19 +197,19 @@ main (int argc, char **argv)
options.ancestor_mode = (S_IRWXUGO & ~umask_value) | (S_IWUSR | S_IXUSR);
if (specified_mode)
- {
- struct mode_change *change = mode_compile (specified_mode);
- if (!change)
- error (EXIT_FAILURE, 0, _("invalid mode %s"),
- quote (specified_mode));
- options.mode = mode_adjust (S_IRWXUGO, true, umask_value, change,
- &options.mode_bits);
- free (change);
- }
+ {
+ struct mode_change *change = mode_compile (specified_mode);
+ if (!change)
+ error (EXIT_FAILURE, 0, _("invalid mode %s"),
+ quote (specified_mode));
+ options.mode = mode_adjust (S_IRWXUGO, true, umask_value, change,
+ &options.mode_bits);
+ free (change);
+ }
else
- options.mode = S_IRWXUGO & ~umask_value;
+ options.mode = S_IRWXUGO & ~umask_value;
}
exit (savewd_process_files (argc - optind, argv + optind,
- process_dir, &options));
+ process_dir, &options));
}