Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

schubi2
Copy link
Contributor

@schubi2 schubi2 commented Aug 19, 2025

This PR should solve:
#3669
by adding a generic function config_file_list which evaluates a sorted list of configuration filenames which have to be parsed/handled.

@schubi2 schubi2 force-pushed the config-files branch 3 times, most recently from 174ce6b to 0d807fa Compare August 19, 2025 13:09
masatake and others added 5 commits August 19, 2025 15:10
Using sizeof for the calculating buffer size is suggested
by @karelzak.

Signed-off-by: Masatake YAMATO <[email protected]>
Traditionally ldattach have hard coded MTU of 127 bytes
which differs from defaults proposed in 3GPP TS 27.010
which is 31 bytes when basic framing is used.

Add '-m <value>' parameter that is only GSM0710 specific
and already handled by the kernel. Use same value for both
MTU and MRU.

Signed-off-by: Seppo Takalo <[email protected]>
…ion after trapping

After upgrading bash to 5.3 to contain commit [1], if SIGINT was trapped in
asynchronous subshell, bash called set_signal_async_ignored to make sure
processes that are created by this asynchronous subshell to ignore SIGINT.

And it caused test case `kill/decode' failed, the signal INT was existed in
both of Blocked and Ignored

$ ./tests/run.sh --use-system-commands --parsable --show-diff   kill/decode
...
diff-{{{
|--- /usr/lib/util-linux/ptest/tests/expected/kill/decode        2011-04-05 23:00:00.000000000 +0000
|+++ /usr/lib/util-linux/ptest/tests/output/kill/decode  2025-07-28 12:09:46.279000000 +0000
@@ -16,5 +16,5 @@
 Pending (thread): INT ILL
 Pending (process): USR1
 Blocked: INT ILL ABRT FPE USR1 SEGV TERM
-Ignored: HUP QUIT TRAP PIPE ALRM
+Ignored: HUP INT QUIT TRAP PIPE ALRM
 Caught: ILL USR1
}}}-diff
...

Explicitly reset SIGINT to default action after trapping, then the
test case `kill/decode' works on both of old (<5.3) and new (>=5.3) bash

[1] https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=a5d2617c7a7e602ace1f4149987cdfd075c4e762

Signed-off-by: Hongxu Jia <[email protected]>
This extends commit e7a2d62
("chrt: Make priority optional for policies that don't use it")
so that priority arguments are optional even when --pid is not specified.

Before this patch:
$ chrt --other ls -lh
chrt: invalid priority argument: 'ls'
-> only "chrt --other 0 ls -lh" would work

After this patch:
$ chrt --other ls -lh
$ chrt --other 0 ls -lh
-> both now work

If an out‑of‑range priority is given, it reports an error:
$ chrt --other 1 ls -lh
unsupported priority value for the policy: 1 (see --max for valid range)

Changes in v2:
- Removed is_number() and used isdigit_string() (Karel Zak)
- used _() for translation (Karel Zak)

Fixes: e7a2d62 ("chrt: Make priority optional for policies that don't use it")
Signed-off-by: Madadi Vineeth Reddy <[email protected]>
@karelzak
Copy link
Collaborator

karelzak commented Aug 20, 2025

What about making the API a little bit more friendly:

struct list_head *ls = NULL;      
char *name = NULL;          
                            
config_files_get_list(&ls, project, etc, usr, name, suffix);
                            
while (config_files_next_filename(ls, &name) == 0) {
  ...                       
}                           
                            
config_files_free_list(ls);     

It means hiding the details about the list and its elements, etc.

(EDIT: config_files_next_filename() will require an additional argument to the current list element, or we need to introduce struct ul_config_list to hide all completely.)

@karelzak
Copy link
Collaborator

karelzak commented Sep 2, 2025

It looks good at first glance. I'll play with it later (well, we need to rebase it and merge some commits).

Would you like to implement config_files_next_filename() to avoid direct list use in the applications?

@schubi2
Copy link
Contributor Author

schubi2 commented Sep 2, 2025

I

What about making the API a little bit more friendly:

struct list_head *ls = NULL;      
char *name = NULL;          
                            
config_files_get_list(&ls, project, etc, usr, name, suffix);
                            
while (config_files_next_filename(ls, &name) == 0) {
  ...                       
}                           
                            
config_files_free_list(ls);     

It means hiding the details about the list and its elements, etc.

(EDIT: config_files_next_filename() will require an additional argument to the current list element, or we need to introduce struct ul_config_list to hide all completely.)

I have added "config_files_next_filename". Looks better :-)

@schubi2
Copy link
Contributor Author

schubi2 commented Sep 2, 2025

we need to rebase it and merge some commits

I would like to do it at the end of the review.

@karelzak
Copy link
Collaborator

I think you can rebase and merge into two commits (first for lib+include/ and next for agetty.c). Thanks!

@schubi2
Copy link
Contributor Author

schubi2 commented Sep 12, 2025

I think you can rebase and merge into two commits (first for lib+include/ and next for agetty.c). Thanks!

Hm, I would prefer to open two new PRs. My experience regarding rebasing stuff with git is not really professional.
Would it be OK for you ?

@karelzak
Copy link
Collaborator

New PRs are fine. Go ahead. Thanks.

@schubi2
Copy link
Contributor Author

schubi2 commented Sep 15, 2025

replaced by : #3749

@schubi2 schubi2 closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants