summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
58a4c59)
Error messages in the llapi functions called by lfs_find()
are updated to a standard format. Messages are prefixed with
the name of the utility and the command that caused the error.
User-provided values are delimited with single quotes.
Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ia324887964b4a89cc5d4f92d3f3a7fa421e03dca
Reviewed-on: https://review.whamcloud.com/28997
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
rc = llapi_getname(path, inst, sizeof(inst));
if (rc != 0)
rc = llapi_getname(path, inst, sizeof(inst));
if (rc != 0)
/* Get the max ea size from llite parameters. */
rc = get_lustre_param_value("llite", inst, FILTER_BY_EXACT,
"max_easize", buf, sizeof(buf));
if (rc != 0)
/* Get the max ea size from llite parameters. */
rc = get_lustre_param_value("llite", inst, FILTER_BY_EXACT,
"max_easize", buf, sizeof(buf));
if (rc != 0)
{
int lum_size = get_mds_md_size(path);
{
int lum_size = get_mds_md_size(path);
+ if (lum_size < 0)
+ return lum_size;
+
if (lum_size < PATH_MAX + 1)
lum_size = PATH_MAX + 1;
if (lum_size < PATH_MAX + 1)
lum_size = PATH_MAX + 1;
int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_name)
{
int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_name)
{
- int rc = ioctl(fd, OBD_IOC_GETNAME, lov_name);
- if (rc) {
- rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "error: can't get lov name.");
- }
- return rc;
+ int rc = ioctl(fd, OBD_IOC_GETNAME, lov_name);
+
+ if (rc) {
+ rc = -errno;
+ llapi_error(LLAPI_MSG_ERROR, rc, "cannot get lov name");
+ }
+ return rc;
}
int llapi_file_fget_lmv_uuid(int fd, struct obd_uuid *lov_name)
}
int llapi_file_fget_lmv_uuid(int fd, struct obd_uuid *lov_name)
fd = open(path, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
rc = -errno;
fd = open(path, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
rc = -errno;
- llapi_error(LLAPI_MSG_ERROR, rc, "error opening %s", path);
+ llapi_error(LLAPI_MSG_ERROR, rc, "cannot open '%s'", path);
- llapi_error(LLAPI_MSG_ERROR, ret, "get ost uuid failed");
- goto out_free;
- }
+ llapi_error(LLAPI_MSG_ERROR, ret, "cannot get ost uuid");
+ goto out_free;
+ }
indexes = malloc(num_obds * sizeof(*obdindex));
if (indexes == NULL) {
indexes = malloc(num_obds * sizeof(*obdindex));
if (indexes == NULL) {
- if (i >= obdcount) {
- indexes[obdnum] = OBD_NOT_FOUND;
- llapi_err_noerrno(LLAPI_MSG_ERROR,
- "error: %s: unknown obduuid: %s",
- __func__, obduuids[obdnum].uuid);
- ret = -EINVAL;
- }
- }
+ if (i >= obdcount) {
+ indexes[obdnum] = OBD_NOT_FOUND;
+ llapi_err_noerrno(LLAPI_MSG_ERROR,
+ "invalid obduuid '%s'",
+ obduuids[obdnum].uuid);
+ ret = -EINVAL;
+ }
+ }
if (obd_valid == 0)
*obdindex = OBD_NOT_FOUND;
if (obd_valid == 0)
*obdindex = OBD_NOT_FOUND;