Whamcloud - gitweb
LU-6142 utils: Fix style issues for liblustreapi.c
[fs/lustre-release.git] / lustre / utils / llsom_sync.c
index 9676ded..9d1069c 100644 (file)
 #include <libcfs/util/list.h>
 #include <libcfs/util/parser.h>
 
-#ifndef PATH_MAX
-#define PATH_MAX (4096)
-#endif
-
 #define container_of(ptr, type, member) ({                      \
        const typeof(((type *) 0)->member) * __mptr = (ptr);     \
        (type *) ((char *) __mptr - offsetof(type, member)); })
@@ -276,7 +272,9 @@ static int lsom_update_one(struct fid_rec *f)
 
        llapi_printf(LLAPI_MSG_DEBUG,
                     "record %llu:%llu, updated LSOM for fid " DFID
-                    " size:%lu blocks:%lu\n", f->fr_time, f->fr_index,
+                    " size:%lu blocks:%lu\n",
+                    (unsigned long long)f->fr_time,
+                    (unsigned long long)f->fr_index,
                     PFID(&f->fr_fid), st.st_size, st.st_blocks);
 
 clean_up:
@@ -285,7 +283,7 @@ clean_up:
        if (rc)
                llapi_error(LLAPI_MSG_ERROR, rc,
                            "failed to clear changelog record: %s:%llu",
-                           opt.o_chlg_user, f->fr_index);
+                           opt.o_chlg_user, (unsigned long long)f->fr_index);
        return rc;
 }
 
@@ -408,8 +406,9 @@ static int process_record(struct changelog_rec *rec)
                }
        }
 
-       llapi_printf(LLAPI_MSG_DEBUG, "Processed changelog record index:%llu "
-                    "type:%s(0x%x) FID:"DFID"\n", index,
+       llapi_printf(LLAPI_MSG_DEBUG,
+                    "Processed changelog record index:%llu type:%s(0x%x) FID:"DFID"\n",
+                    (unsigned long long)index,
                     changelog_type2str(__le32_to_cpu(rec->cr_type)),
                     __le32_to_cpu(rec->cr_type), PFID(&rec->cr_tfid));
 
@@ -474,7 +473,7 @@ int main(int argc, char **argv)
                default:
                        rc = -EINVAL;
                        llapi_error(LLAPI_MSG_ERROR, rc,
-                                   "%s: unknown option '-%c'\n",
+                                   "%s: unknown option '%c'",
                                    argv[0], optopt);
                        return rc;
                case 'u':
@@ -583,7 +582,7 @@ int main(int argc, char **argv)
                                           opt.o_mdtname, 0);
                if (rc) {
                        llapi_error(LLAPI_MSG_ERROR, rc,
-                                   "unable to open changelog of MDT [%s]\n",
+                                   "unable to open changelog of MDT '%s'",
                                    opt.o_mdtname);
                        return rc;
                }
@@ -629,7 +628,7 @@ int main(int argc, char **argv)
                rc = llapi_changelog_fini(&chglog_hdlr);
                if (rc) {
                        llapi_error(LLAPI_MSG_ERROR, rc,
-                                   "unable to close changelog of MDT [%s]",
+                                   "unable to close changelog of MDT '%s'",
                                    opt.o_mdtname);
                        ret = rc;
                        return rc;