Blame SOURCES/util-Code-is-80-characterswide.patch

b7f731
From b7a462e56135e38dfd9e53aeed6f425c28b1bbc7 Mon Sep 17 00:00:00 2001
b7f731
From: Jes Sorensen <jsorensen@fb.com>
b7f731
Date: Fri, 29 Sep 2017 18:15:23 -0400
b7f731
Subject: [RHEL7.5 PATCH 13/13] util: Code is 80 characters wide
b7f731
b7f731
Lets not make things uglier than they need to be.
b7f731
b7f731
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
b7f731
---
b7f731
 util.c | 33 +++++++++++++++++++++------------
b7f731
 1 file changed, 21 insertions(+), 12 deletions(-)
b7f731
b7f731
diff --git a/util.c b/util.c
b7f731
index c1c8509..68af381 100644
b7f731
--- a/util.c
b7f731
+++ b/util.c
b7f731
@@ -147,9 +147,9 @@ int cluster_get_dlmlock(int *lockid)
b7f731
 	}
b7f731
 
b7f731
 	snprintf(str, 64, "bitmap%s", cluster_name);
b7f731
-	ret = dlm_hooks->ls_lock(dlm_lock_res->ls, LKM_PWMODE, &dlm_lock_res->lksb,
b7f731
-			  flags, str, strlen(str), 0, dlm_ast,
b7f731
-			  dlm_lock_res, NULL, NULL);
b7f731
+	ret = dlm_hooks->ls_lock(dlm_lock_res->ls, LKM_PWMODE,
b7f731
+				 &dlm_lock_res->lksb, flags, str, strlen(str),
b7f731
+				 0, dlm_ast, dlm_lock_res, NULL, NULL);
b7f731
 	if (ret) {
b7f731
 		pr_err("error %d when get PW mode on lock %s\n", errno, str);
b7f731
 		dlm_hooks->release_lockspace(cluster_name, dlm_lock_res->ls, 1);
b7f731
@@ -183,7 +183,8 @@ int cluster_release_dlmlock(int lockid)
b7f731
 
b7f731
 	errno =	dlm_lock_res->lksb.sb_status;
b7f731
 	if (errno != EUNLOCK) {
b7f731
-		pr_err("error %d happened in ast when unlock lockspace\n", errno);
b7f731
+		pr_err("error %d happened in ast when unlock lockspace\n",
b7f731
+		       errno);
b7f731
 		/* XXX make sure the lockspace is unlocked eventually */
b7f731
                 goto out;
b7f731
 	}
b7f731
@@ -639,14 +640,16 @@ char *__fname_from_uuid(int id[4], int swap, char *buf, char sep)
b7f731
 
b7f731
 }
b7f731
 
b7f731
-char *fname_from_uuid(struct supertype *st, struct mdinfo *info, char *buf, char sep)
b7f731
+char *fname_from_uuid(struct supertype *st, struct mdinfo *info,
b7f731
+		      char *buf, char sep)
b7f731
 {
b7f731
 	// dirty hack to work around an issue with super1 superblocks...
b7f731
 	// super1 superblocks need swapuuid set in order for assembly to
b7f731
 	// work, but can't have it set if we want this printout to match
b7f731
 	// all the other uuid printouts in super1.c, so we force swapuuid
b7f731
 	// to 1 to make our printout match the rest of super1
b7f731
-	return __fname_from_uuid(info->uuid, (st->ss == &super1) ? 1 : st->ss->swapuuid, buf, sep);
b7f731
+	return __fname_from_uuid(info->uuid, (st->ss == &super1) ? 1 :
b7f731
+				 st->ss->swapuuid, buf, sep);
b7f731
 }
b7f731
 
b7f731
 int check_ext2(int fd, char *name)
b7f731
@@ -1084,9 +1087,11 @@ int dev_open(char *dev, int flags)
b7f731
 		}
b7f731
 		if (fd < 0) {
b7f731
 			/* Try /tmp as /dev appear to be read-only */
b7f731
-			snprintf(devname, sizeof(devname), "/tmp/.tmp.md.%d:%d:%d",
b7f731
+			snprintf(devname, sizeof(devname),
b7f731
+				 "/tmp/.tmp.md.%d:%d:%d",
b7f731
 				 (int)getpid(), major, minor);
b7f731
-			if (mknod(devname, S_IFBLK|0600, makedev(major, minor)) == 0) {
b7f731
+			if (mknod(devname, S_IFBLK|0600,
b7f731
+				  makedev(major, minor)) == 0) {
b7f731
 				fd = open(devname, flags);
b7f731
 				unlink(devname);
b7f731
 			}
b7f731
@@ -2261,8 +2266,10 @@ void set_cmap_hooks(void)
b7f731
 	if (!cmap_hooks->cmap_handle)
b7f731
 		return;
b7f731
 
b7f731
-	cmap_hooks->initialize = dlsym(cmap_hooks->cmap_handle, "cmap_initialize");
b7f731
-	cmap_hooks->get_string = dlsym(cmap_hooks->cmap_handle, "cmap_get_string");
b7f731
+	cmap_hooks->initialize =
b7f731
+		dlsym(cmap_hooks->cmap_handle, "cmap_initialize");
b7f731
+	cmap_hooks->get_string =
b7f731
+		dlsym(cmap_hooks->cmap_handle, "cmap_get_string");
b7f731
 	cmap_hooks->finalize = dlsym(cmap_hooks->cmap_handle, "cmap_finalize");
b7f731
 
b7f731
 	if (!cmap_hooks->initialize || !cmap_hooks->get_string ||
b7f731
@@ -2305,8 +2312,10 @@ void set_dlm_hooks(void)
b7f731
 	if (!dlm_hooks->dlm_handle)
b7f731
 		return;
b7f731
 
b7f731
-	dlm_hooks->create_lockspace = dlsym(dlm_hooks->dlm_handle, "dlm_create_lockspace");
b7f731
-	dlm_hooks->release_lockspace = dlsym(dlm_hooks->dlm_handle, "dlm_release_lockspace");
b7f731
+	dlm_hooks->create_lockspace =
b7f731
+		dlsym(dlm_hooks->dlm_handle, "dlm_create_lockspace");
b7f731
+	dlm_hooks->release_lockspace =
b7f731
+		dlsym(dlm_hooks->dlm_handle, "dlm_release_lockspace");
b7f731
 	dlm_hooks->ls_lock = dlsym(dlm_hooks->dlm_handle, "dlm_ls_lock");
b7f731
 	dlm_hooks->ls_unlock = dlsym(dlm_hooks->dlm_handle, "dlm_ls_unlock");
b7f731
 	dlm_hooks->ls_get_fd = dlsym(dlm_hooks->dlm_handle, "dlm_ls_get_fd");
b7f731
-- 
b7f731
2.7.4
b7f731