1
0
mirror of https://github.com/systemd/systemd synced 2026-03-20 03:54:45 +01:00

Compare commits

..

No commits in common. "107e21635bb59a01bc92dda05211b03a7d40bde6" and "21ac7884e9c1684d091d893254bcbe4b83740e9f" have entirely different histories.

4 changed files with 11 additions and 21 deletions

View File

@ -1761,9 +1761,6 @@ char** _hashmap_get_strv(HashmapBase *h) {
Iterator i;
unsigned idx, n;
if (!h)
return new0(char*, 1);
sv = new(char*, n_entries(h)+1);
if (!sv)
return NULL;

View File

@ -150,7 +150,7 @@ static int acquire_journal(sd_journal **ret, char **matches) {
return 0;
}
static int verb_help(int argc, char **argv, void *userdata) {
static int help(void) {
_cleanup_free_ char *link = NULL;
int r;
@ -232,7 +232,7 @@ static int parse_argv(int argc, char *argv[]) {
while ((c = getopt_long(argc, argv, "hA:o:F:1D:rS:U:qn:", options, NULL)) >= 0)
switch(c) {
case 'h':
return verb_help(0, NULL, NULL);
return help();
case ARG_VERSION:
return version();
@ -1242,7 +1242,6 @@ static int coredumpctl_main(int argc, char *argv[]) {
{ "dump", VERB_ANY, VERB_ANY, 0, dump_core },
{ "debug", VERB_ANY, VERB_ANY, 0, run_debug },
{ "gdb", VERB_ANY, VERB_ANY, 0, run_debug },
{ "help", VERB_ANY, 1, 0, verb_help },
{}
};

View File

@ -114,7 +114,7 @@ static int find_gpt_root(sd_device *dev, blkid_probe pr, bool test) {
#if defined(GPT_ROOT_NATIVE) && ENABLE_EFI
_cleanup_free_ char *root_id = NULL, *root_label = NULL;
_cleanup_free_ char *root_id = NULL;
bool found_esp = false;
blkid_partlist pl;
int i, nvals, r;
@ -133,7 +133,7 @@ static int find_gpt_root(sd_device *dev, blkid_probe pr, bool test) {
nvals = blkid_partlist_numof_partitions(pl);
for (i = 0; i < nvals; i++) {
blkid_partition pp;
const char *stype, *sid, *label;
const char *stype, *sid;
sd_id128_t type;
pp = blkid_partlist_get_partition(pl, i);
@ -144,8 +144,6 @@ static int find_gpt_root(sd_device *dev, blkid_probe pr, bool test) {
if (!sid)
continue;
label = blkid_partition_get_name(pp); /* returns NULL if empty */
stype = blkid_partition_get_type_string(pp);
if (!stype)
continue;
@ -176,17 +174,13 @@ static int find_gpt_root(sd_device *dev, blkid_probe pr, bool test) {
if (flags & GPT_FLAG_NO_AUTO)
continue;
/* We found a suitable root partition, let's remember the first one, or the one with
* the newest version, as determined by comparing the partition labels. */
/* We found a suitable root partition, let's
* remember the first one. */
if (!root_id || strverscmp_improved(label, root_label) > 0) {
r = free_and_strdup(&root_id, sid);
if (r < 0)
return r;
r = free_and_strdup(&root_label, label);
if (r < 0)
return r;
if (!root_id) {
root_id = strdup(sid);
if (!root_id)
return -ENOMEM;
}
}
}

View File

@ -8,7 +8,7 @@
# (at your option) any later version.
[Unit]
Description=Late Shutdown Services
Description=Late Boot Services
Documentation=man:systemd.special(7)
DefaultDependencies=no
RefuseManualStart=yes