-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main/openrc-settingsd: fix segmentation fault
- Loading branch information
Showing
2 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -389,7 +389,7 @@ new file mode 100644 | |
index 0000000..21342f5 | ||
--- /dev/null | ||
+++ b/src/localectl.c | ||
@@ -0,0 +1,384 @@ | ||
@@ -0,0 +1,388 @@ | ||
+/* | ||
+ Copyright 2024 Gnarwhal <[email protected]> | ||
+ Copyright 2024 q66 <[email protected]> | ||
|
@@ -646,6 +646,7 @@ index 0000000..21342f5 | |
+ { "machine", required_argument, NULL, 'M' }, | ||
+ { "no-ask-password", no_argument, NULL, ARG_NO_ASK_PASSWORD }, | ||
+ { "no-convert", no_argument, NULL, ARG_NO_CONVERT }, | ||
+ {}, | ||
+ }; | ||
+ | ||
+ int c; | ||
|
@@ -655,6 +656,7 @@ index 0000000..21342f5 | |
+ g_assert (argc >= 0); | ||
+ g_assert (argv); | ||
+ | ||
+ const char * badopt; | ||
+ while ((c = getopt_long (argc, argv, "h", options, NULL)) >= 0) { | ||
+ switch (c) { | ||
+ case 'h': | ||
|
@@ -674,7 +676,9 @@ index 0000000..21342f5 | |
+ break; | ||
+ | ||
+ default: | ||
+ warn ("invalid option -- '%c'", c); | ||
+ badopt = argv[optind - 1]; | ||
+ while (*++badopt == '-'); | ||
+ warn ("invalid option -- '%s'", badopt); | ||
+ return 1; | ||
+ } | ||
+ } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters