chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udev: do NOT re-label smack
[elogind.git]
/
src
/
udev
/
udev-builtin-blkid.c
diff --git
a/src/udev/udev-builtin-blkid.c
b/src/udev/udev-builtin-blkid.c
index 5b976abd8d70dbb2f607af0b394e22e43a301372..810f27d1d0c5532218633d79f3d9467bf2d45e85 100644
(file)
--- a/
src/udev/udev-builtin-blkid.c
+++ b/
src/udev/udev-builtin-blkid.c
@@
-34,8
+34,7
@@
#include "efivars.h"
#include "udev.h"
#include "efivars.h"
#include "udev.h"
-static void print_property(struct udev_device *dev, bool test, const char *name, const char *value)
-{
+static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) {
char s[256];
s[0] = '\0';
char s[256];
s[0] = '\0';
@@
-182,8
+181,7
@@
static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
return 0;
}
return 0;
}
-static int probe_superblocks(blkid_probe pr)
-{
+static int probe_superblocks(blkid_probe pr) {
struct stat st;
int rc;
struct stat st;
int rc;
@@
-215,8
+213,7
@@
static int probe_superblocks(blkid_probe pr)
return blkid_do_safeprobe(pr);
}
return blkid_do_safeprobe(pr);
}
-static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test)
-{
+static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test) {
const char *root_partition;
int64_t offset = 0;
bool noraid = false;
const char *root_partition;
int64_t offset = 0;
bool noraid = false;
@@
-226,7
+223,6
@@
static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
const char *name;
int nvals;
int i;
const char *name;
int nvals;
int i;
- size_t len;
int err = 0;
bool is_gpt = false;
int err = 0;
bool is_gpt = false;
@@
-275,9
+271,9
@@
static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
if (err < 0)
goto out;
if (err < 0)
goto out;
- log_debug("probe %s %sraid offset=%
llu"
,
+ log_debug("probe %s %sraid offset=%
"PRIu64
,
udev_device_get_devnode(dev),
udev_device_get_devnode(dev),
- noraid ? "no" : "",
(unsigned long long)
offset);
+ noraid ? "no" : "", offset);
err = probe_superblocks(pr);
if (err < 0)
err = probe_superblocks(pr);
if (err < 0)
@@
-289,11
+285,10
@@
static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
nvals = blkid_probe_numof_values(pr);
for (i = 0; i < nvals; i++) {
nvals = blkid_probe_numof_values(pr);
for (i = 0; i < nvals; i++) {
- if (blkid_probe_get_value(pr, i, &name, &data,
&len
))
+ if (blkid_probe_get_value(pr, i, &name, &data,
NULL
))
continue;
continue;
- len = strnlen((char *) data, len);
- print_property(dev, test, name, (char *) data);
+ print_property(dev, test, name, data);
/* Is this a disk with GPT partition table? */
if (streq(name, "PTTYPE") && streq(data, "gpt"))
/* Is this a disk with GPT partition table? */
if (streq(name, "PTTYPE") && streq(data, "gpt"))