mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
util: adjust indentation in previous patch
Separating the indentation from the real patch made review easier. * src/util/util.c (virFileOpenAs): Whitespace changes.
This commit is contained in:
parent
1fdd50f999
commit
fa3e1e35eb
@ -1439,8 +1439,7 @@ static int virDirCreateNoFork(const char *path, mode_t mode, uid_t uid, gid_t gi
|
||||
struct stat st;
|
||||
|
||||
if ((mkdir(path, mode) < 0)
|
||||
&& !((errno == EEXIST) && (flags & VIR_DIR_CREATE_ALLOW_EXIST)))
|
||||
{
|
||||
&& !((errno == EEXIST) && (flags & VIR_DIR_CREATE_ALLOW_EXIST))) {
|
||||
ret = -errno;
|
||||
virReportSystemError(errno, _("failed to create directory '%s'"),
|
||||
path);
|
||||
@ -1516,7 +1515,6 @@ virFileOpenAs(const char *path, int openflags, mode_t mode,
|
||||
* following dance avoids problems caused by root-squashing
|
||||
* NFS servers. */
|
||||
|
||||
{
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) < 0) {
|
||||
ret = -errno;
|
||||
virReportSystemError(errno,
|
||||
@ -1536,7 +1534,6 @@ virFileOpenAs(const char *path, int openflags, mode_t mode,
|
||||
cmsg->cmsg_level = SOL_SOCKET;
|
||||
cmsg->cmsg_type = SCM_RIGHTS;
|
||||
cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
|
||||
}
|
||||
|
||||
forkRet = virFork(&pid);
|
||||
|
||||
@ -1546,7 +1543,6 @@ virFileOpenAs(const char *path, int openflags, mode_t mode,
|
||||
}
|
||||
|
||||
if (pid) { /* parent */
|
||||
{
|
||||
VIR_FORCE_CLOSE(pair[1]);
|
||||
|
||||
do {
|
||||
@ -1569,7 +1565,6 @@ virFileOpenAs(const char *path, int openflags, mode_t mode,
|
||||
cmsg->cmsg_type == SCM_RIGHTS) {
|
||||
memcpy(&fd, CMSG_DATA(cmsg), sizeof(fd));
|
||||
}
|
||||
}
|
||||
|
||||
/* wait for child to complete, and retrieve its exit code */
|
||||
while ((waitret = waitpid(pid, &status, 0) == -1)
|
||||
@ -1649,7 +1644,6 @@ parenterror:
|
||||
path, mode);
|
||||
goto childerror;
|
||||
}
|
||||
{
|
||||
memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd));
|
||||
|
||||
do {
|
||||
@ -1660,7 +1654,6 @@ parenterror:
|
||||
ret = -errno;
|
||||
goto childerror;
|
||||
}
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
childerror:
|
||||
|
Loading…
Reference in New Issue
Block a user