|
|
2f13d7 |
From 845b5c3882b1eecb31d712b61a4e91fe0eb70712 Mon Sep 17 00:00:00 2001
|
|
|
2f13d7 |
From: Matthew Almond <malmond@fb.com>
|
|
|
2f13d7 |
Date: Sun, 31 Jan 2021 12:30:33 -0800
|
|
|
2f13d7 |
Subject: [PATCH 02/30] Remove use of bool type for consistency
|
|
|
2f13d7 |
|
|
|
2f13d7 |
---
|
|
|
bd9c00 |
lib/fsm.c | 11 +++++------
|
|
|
bd9c00 |
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
2f13d7 |
|
|
|
2f13d7 |
diff --git a/lib/fsm.c b/lib/fsm.c
|
|
|
2f13d7 |
index 90193c749..feda3750c 100644
|
|
|
2f13d7 |
--- a/lib/fsm.c
|
|
|
2f13d7 |
+++ b/lib/fsm.c
|
|
|
2f13d7 |
@@ -8,7 +8,6 @@
|
|
|
bd9c00 |
#include <inttypes.h>
|
|
|
2f13d7 |
#include <utime.h>
|
|
|
2f13d7 |
#include <errno.h>
|
|
|
2f13d7 |
-#include <stdbool.h>
|
|
|
bd9c00 |
#include <fcntl.h>
|
|
|
bd9c00 |
#ifdef WITH_CAP
|
|
|
2f13d7 |
#include <sys/capability.h>
|
|
|
bd9c00 |
@@ -56,7 +55,7 @@ struct filedata_s {
|
|
|
bd9c00 |
int stage;
|
|
|
bd9c00 |
int setmeta;
|
|
|
bd9c00 |
int skip;
|
|
|
bd9c00 |
- bool plugin_contents;
|
|
|
bd9c00 |
+ int plugin_contents;
|
|
|
bd9c00 |
rpmFileAction action;
|
|
|
bd9c00 |
const char *suffix;
|
|
|
bd9c00 |
char *fpath;
|
|
|
bd9c00 |
@@ -890,10 +889,10 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
|
|
|
bd9c00 |
struct diriter_s di = { -1, -1 };
|
|
|
2f13d7 |
Header h = rpmteHeader(te);
|
|
|
2f13d7 |
const char *payloadfmt = headerGetString(h, RPMTAG_PAYLOADFORMAT);
|
|
|
2f13d7 |
- bool cpio = true;
|
|
|
2f13d7 |
+ int cpio = 1;
|
|
|
2f13d7 |
|
|
|
2f13d7 |
if (payloadfmt && rstreq(payloadfmt, "clon")) {
|
|
|
2f13d7 |
- cpio = false;
|
|
|
2f13d7 |
+ cpio = 0;
|
|
|
2f13d7 |
}
|
|
|
2f13d7 |
|
|
|
2f13d7 |
/* transaction id used for temporary path suffix while installing */
|
|
|
bd9c00 |
@@ -924,7 +923,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
|
|
|
2f13d7 |
setFileState(fs, fx);
|
|
|
2f13d7 |
break;
|
|
|
2f13d7 |
case RPMRC_PLUGIN_CONTENTS:
|
|
|
2f13d7 |
- fp->plugin_contents = true;
|
|
|
2f13d7 |
+ fp->plugin_contents = 1;
|
|
|
2f13d7 |
// reduce reads on cpio to this value. Could be zero if
|
|
|
2f13d7 |
// this is from a hard link.
|
|
|
2f13d7 |
rc = RPMRC_OK;
|
|
|
bd9c00 |
@@ -986,7 +985,7 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
|
|
|
bd9c00 |
rc = rpmpluginsCallFsmFilePre(plugins, fi, fp->fpath,
|
|
|
bd9c00 |
fp->sb.st_mode, fp->action);
|
|
|
bd9c00 |
if (rc == RPMRC_PLUGIN_CONTENTS) {
|
|
|
bd9c00 |
- fp->plugin_contents = true;
|
|
|
bd9c00 |
+ fp->plugin_contents = 1;
|
|
|
bd9c00 |
rc = RPMRC_OK;
|
|
|
bd9c00 |
}
|
|
|
bd9c00 |
}
|
|
|
2f13d7 |
--
|
|
|
2f13d7 |
2.35.1
|
|
|
2f13d7 |
|