util: don't shadow global umask declaration

Commit 0e1a1a8c introduced umask for virCommand, but the variables
used emit a warning on older compilers about shadowed global
declaration.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-09-03 15:39:15 +02:00
parent 760cf5d30e
commit e9f6937454

View File

@ -133,7 +133,7 @@ struct _virCommand {
#if defined(WITH_SECDRIVER_APPARMOR) #if defined(WITH_SECDRIVER_APPARMOR)
char *appArmorProfile; char *appArmorProfile;
#endif #endif
int umask; int mask;
}; };
/* See virCommandSetDryRun for description for this variable */ /* See virCommandSetDryRun for description for this variable */
@ -583,8 +583,8 @@ virExec(virCommandPtr cmd)
/* child */ /* child */
if (cmd->umask) if (cmd->mask)
umask(cmd->umask); umask(cmd->mask);
ret = EXIT_CANCELED; ret = EXIT_CANCELED;
openmax = sysconf(_SC_OPEN_MAX); openmax = sysconf(_SC_OPEN_MAX);
if (openmax < 0) { if (openmax < 0) {
@ -1085,12 +1085,12 @@ virCommandSetMaxFiles(virCommandPtr cmd, unsigned int files)
cmd->maxFiles = files; cmd->maxFiles = files;
} }
void virCommandSetUmask(virCommandPtr cmd, int umask) void virCommandSetUmask(virCommandPtr cmd, int mask)
{ {
if (!cmd || cmd->has_error) if (!cmd || cmd->has_error)
return; return;
cmd->umask = umask; cmd->mask = mask;
} }
/** /**