Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-12757 utils: avoid newline inside error message
[fs/lustre-release.git]
/
lustre
/
utils
/
llog_reader.c
diff --git
a/lustre/utils/llog_reader.c
b/lustre/utils/llog_reader.c
index
6c776e2
..
01e59de
100644
(file)
--- a/
lustre/utils/llog_reader.c
+++ b/
lustre/utils/llog_reader.c
@@
-185,7
+185,8
@@
int main(int argc, char **argv)
is_ext = is_fstype_ext(fd);
if (is_ext < 0) {
rc = is_ext;
is_ext = is_fstype_ext(fd);
if (is_ext < 0) {
rc = is_ext;
- printf("Unable to determine type of filesystem containing %s\n",
+ llapi_error(LLAPI_MSG_ERROR, -rc,
+ "Unable to determine filesystem type for %s",
argv[1]);
goto out_fd;
}
argv[1]);
goto out_fd;
}
@@
-233,8
+234,7
@@
int llog_pack_buffer(int fd, struct llog_log_hdr **llog,
file_size = st.st_size;
if (file_size < sizeof(**llog)) {
llapi_error(LLAPI_MSG_ERROR, rc,
file_size = st.st_size;
if (file_size < sizeof(**llog)) {
llapi_error(LLAPI_MSG_ERROR, rc,
- "File too small for llog header: "
- "need %zd, size %lld\n",
+ "File too small for llog header: want=%zd got=%lld",
sizeof(**llog), file_size);
rc = -EIO;
goto out;
sizeof(**llog), file_size);
rc = -EIO;
goto out;
@@
-356,7
+356,6
@@
void llog_unpack_buffer(int fd, struct llog_log_hdr *llog_buf,
free(llog_buf);
if (recs_buf != NULL)
free(recs_buf);
free(llog_buf);
if (recs_buf != NULL)
free(recs_buf);
- return;
}
void print_llog_header(struct llog_log_hdr *llog_buf)
}
void print_llog_header(struct llog_log_hdr *llog_buf)
@@
-378,7
+377,6
@@
void print_llog_header(struct llog_log_hdr *llog_buf)
/* Add the other info you want to view here */
printf("-----------------------\n");
/* Add the other info you want to view here */
printf("-----------------------\n");
- return;
}
static void print_1_cfg(struct lustre_cfg *lcfg)
}
static void print_1_cfg(struct lustre_cfg *lcfg)
@@
-393,7
+391,6
@@
static void print_1_cfg(struct lustre_cfg *lcfg)
for (i = 0; i < lcfg->lcfg_bufcount; i++)
printf("%d:%.*s ", i, lcfg->lcfg_buflens[i],
(char*)lustre_cfg_buf(lcfg, i));
for (i = 0; i < lcfg->lcfg_bufcount; i++)
printf("%d:%.*s ", i, lcfg->lcfg_buflens[i],
(char*)lustre_cfg_buf(lcfg, i));
- return;
}
static char *lustre_cfg_string(struct lustre_cfg *lcfg, __u32 index)
}
static char *lustre_cfg_string(struct lustre_cfg *lcfg, __u32 index)
@@
-449,8
+446,6
@@
static void print_setup_cfg(struct lustre_cfg *lcfg)
printf("setup ");
print_1_cfg(lcfg);
}
printf("setup ");
print_1_cfg(lcfg);
}
-
- return;
}
void print_lustre_cfg(struct lustre_cfg *lcfg, int *skip)
}
void print_lustre_cfg(struct lustre_cfg *lcfg, int *skip)
@@
-638,7
+633,6
@@
void print_lustre_cfg(struct lustre_cfg *lcfg, int *skip)
printf("unsupported cmd_code = %x\n",cmd);
}
printf("\n");
printf("unsupported cmd_code = %x\n",cmd);
}
printf("\n");
- return;
}
static void print_hsm_action(struct llog_agent_req_rec *larr)
}
static void print_hsm_action(struct llog_agent_req_rec *larr)