*dirp = NULL;
ret = -errno;
llapi_error(LLAPI_MSG_ERROR, ret,
- "can not open %s\n", path);
+ "can not open %s", path);
return ret;
}
}
if (fd < 0) {
rc = -errno;
llapi_error(LLAPI_MSG_ERROR, rc,
- "Can't open '%s'\n", mnt->mnt_dir);
+ "Can't open '%s'", mnt->mnt_dir);
goto out;
}
if (rc < 0) {
rc = -errno;
llapi_error(LLAPI_MSG_ERROR, rc,
- "ioctl RMTACL on '%s' err %d\n",
+ "ioctl RMTACL on '%s' err %d",
mnt->mnt_dir, rc);
goto out;
}
if (output_func) {
if (pipe(fd) < 0) {
rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "Can't create pipe\n");
+ llapi_error(LLAPI_MSG_ERROR, rc, "Can't create pipe");
return rc;
}
pid = fork();
if (pid < 0) {
rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "Can't fork\n");
+ llapi_error(LLAPI_MSG_ERROR, rc, "Can't fork");
close(fd[0]);
close(fd[1]);
return rc;
if (dup2(fd[1], 1) < 0) {
rc = -errno;
llapi_error(LLAPI_MSG_ERROR, rc,
- "Can't dup2 %d\n", fd[1]);
+ "Can't dup2 %d", fd[1]);
close(fd[1]);
return rc;
}
fp = fdopen(fd[0], "r");
if (fp == NULL) {
rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "fdopen %d failed\n", fd[0]);
+ llapi_error(LLAPI_MSG_ERROR, rc, "fdopen %d failed", fd[0]);
kill(pid, SIGKILL);
close(fd[0]);
return rc;
if (waitpid(pid, &status, 0) < 0) {
rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "waitpid %d failed\n", pid);
+ llapi_error(LLAPI_MSG_ERROR, rc, "waitpid %d failed", pid);
return rc;
}
fd = open("/dev/urandom", O_RDONLY);
if (fd < 0) {
llapi_error(LLAPI_MSG_ERROR, errno,
- "Cannot open /dev/urandom\n");
+ "Cannot open /dev/urandom");
return -errno;
}
rc = read(fd, &random, sizeof(random));
fd = open(file_path, O_RDWR | O_CREAT | open_flags, S_IRUSR | S_IWUSR);
if (fd < 0) {
llapi_error(LLAPI_MSG_ERROR, errno,
- "Cannot create volatile file '%s' in '%s'\n",
+ "Cannot create volatile file '%s' in '%s'",
filename + LUSTRE_VOLATILE_HDR_LEN,
directory);
return -errno;
rc = llapi_fswap_layouts(fd1, fd2, dv1, dv2, flags);
if (rc < 0)
llapi_error(LLAPI_MSG_ERROR, rc,
- "error: cannot swap layout between '%s' and '%s'\n",
+ "error: cannot swap layout between '%s' and '%s'",
path1, path2);
close(fd2);