Skip to content

Commit 1d0c9c8

Browse files
committed
unbreak tools/lvmcmdline.c
1 parent 5d7db0b commit 1d0c9c8

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tools/lvmcmdline.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,33 +1246,6 @@ int lvm_split(char *str, int *argc, char **argv, int max)
12461246
/* Make sure we have always valid filedescriptors 0,1,2 */
12471247
static int _check_standard_fds(void)
12481248
{
1249-
int err = is_valid_fd(STDERR_FILENO);
1250-
1251-
if (!is_valid_fd(STDIN_FILENO) &&
1252-
!(stdin = fopen(_PATH_DEVNULL, "r"))) {
1253-
if (err)
1254-
perror("stdin stream open");
1255-
else
1256-
printf("stdin stream open: %s\n",
1257-
strerror(errno));
1258-
return 0;
1259-
}
1260-
1261-
if (!is_valid_fd(STDOUT_FILENO) &&
1262-
!(stdout = fopen(_PATH_DEVNULL, "w"))) {
1263-
if (err)
1264-
perror("stdout stream open");
1265-
/* else no stdout */
1266-
return 0;
1267-
}
1268-
1269-
if (!is_valid_fd(STDERR_FILENO) &&
1270-
!(stderr = fopen(_PATH_DEVNULL, "w"))) {
1271-
printf("stderr stream open: %s\n",
1272-
strerror(errno));
1273-
return 0;
1274-
}
1275-
12761249
return 1;
12771250
}
12781251

0 commit comments

Comments
 (0)