Skip to content

Commit dc64a7e

Browse files
authored
Merge branch 'main' into sort_sort.pl
2 parents 95b23d7 + e6467b1 commit dc64a7e

File tree

35 files changed

+2548
-181
lines changed

35 files changed

+2548
-181
lines changed

.busybox-config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ CONFIG_FEATURE_FANCY_HEAD=y
22
CONFIG_UNICODE_SUPPORT=y
33
CONFIG_DESKTOP=y
44
CONFIG_LONG_OPTS=y
5+
CONFIG_FEATURE_SORT_BIG=y
6+
CONFIG_FEATURE_CATV=y
7+
CONFIG_FEATURE_CATN=y
8+
CONFIG_FEATURE_TR_CLASSES=y
9+
CONFIG_FEATURE_READLINK_FOLLOW=y

.vscode/cspell.dictionaries/acronyms+names.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ aarch
33
AIX
44
ASLR # address space layout randomization
55
AST # abstract syntax tree
6+
CATN # busybox cat -n feature flag
7+
CATV # busybox cat -v feature flag
68
CICD # continuous integration/deployment
79
CPU
810
CPUs

.vscode/cspell.dictionaries/jargon.wordlist.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
AFAICT
2+
asimd
3+
ASIMD
24
alloc
35
arity
46
autogenerate
@@ -71,6 +73,7 @@ hardlink
7173
hardlinks
7274
hasher
7375
hashsums
76+
hwcaps
7477
infile
7578
iflag
7679
iflags
@@ -97,6 +100,7 @@ nocache
97100
nocreat
98101
noctty
99102
noerror
103+
noexec
100104
nofollow
101105
nolinks
102106
nonblock
@@ -149,6 +153,8 @@ tokenize
149153
toolchain
150154
totalram
151155
truthy
156+
tunables
157+
TUNABLES
152158
ucase
153159
unbuffered
154160
udeps

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,22 @@ getcwd
364364
weblate
365365
algs
366366

367+
# * stty terminal flags
368+
brkint
369+
cstopb
370+
decctlq
371+
echoctl
372+
echoe
373+
echoke
374+
ignbrk
375+
ignpar
376+
icrnl
377+
isig
378+
istrip
379+
litout
380+
opost
381+
parodd
382+
367383
# translation tests
368384
CLICOLOR
369385
erreur

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ crates is as follows:
4545
- `Cargo.toml`
4646
- `src/main.rs`: contains only a single macro call
4747
- `src/<util name>.rs`: the actual code for the utility
48-
- `<util name>.md`: the documentation for the utility
48+
- `locales/en-US.ftl`: the util's strings
49+
- `locales/fr-FR.ftl`: French translation of the util's strings
4950

5051
We have separated repositories for crates that we maintain but also publish for
5152
use by others:

src/uu/chroot/src/chroot.rs

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ mod error;
99
use crate::error::ChrootError;
1010
use clap::{Arg, ArgAction, Command};
1111
use std::ffi::CString;
12-
use std::io::Error;
12+
use std::io::{Error, ErrorKind};
1313
use std::os::unix::prelude::OsStrExt;
14+
use std::os::unix::process::CommandExt;
1415
use std::path::{Path, PathBuf};
1516
use std::process;
1617
use uucore::entries::{Locate, Passwd, grp2gid, usr2uid};
17-
use uucore::error::{UResult, UUsageError, set_exit_code};
18+
use uucore::error::{UResult, UUsageError};
1819
use uucore::fs::{MissingHandling, ResolveMode, canonicalize};
1920
use uucore::libc::{self, chroot, setgid, setgroups, setuid};
2021
use uucore::{format_usage, show};
@@ -205,33 +206,20 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
205206

206207
assert!(!command.is_empty());
207208
let chroot_command = command[0];
208-
let chroot_args = &command[1..];
209209

210210
// NOTE: Tests can only trigger code beyond this point if they're invoked with root permissions
211211
set_context(&options)?;
212212

213-
let pstatus = match process::Command::new(chroot_command)
214-
.args(chroot_args)
215-
.status()
216-
{
217-
Ok(status) => status,
218-
Err(e) => {
219-
return Err(if e.kind() == std::io::ErrorKind::NotFound {
220-
ChrootError::CommandNotFound(command[0].to_string(), e)
221-
} else {
222-
ChrootError::CommandFailed(command[0].to_string(), e)
223-
}
224-
.into());
225-
}
226-
};
213+
let err = process::Command::new(chroot_command)
214+
.args(&command[1..])
215+
.exec();
227216

228-
let code = if pstatus.success() {
229-
0
217+
Err(if err.kind() == ErrorKind::NotFound {
218+
ChrootError::CommandNotFound(chroot_command.to_owned(), err)
230219
} else {
231-
pstatus.code().unwrap_or(-1)
232-
};
233-
set_exit_code(code);
234-
Ok(())
220+
ChrootError::CommandFailed(chroot_command.to_owned(), err)
221+
}
222+
.into())
235223
}
236224

237225
pub fn uu_app() -> Command {

src/uu/env/locales/en-US.ftl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ env-help-debug = print verbose information for each processing step
1212
env-help-split-string = process and split S into separate arguments; used to pass multiple arguments on shebang lines
1313
env-help-argv0 = Override the zeroth argument passed to the command being executed. Without this option a default value of `command` is used.
1414
env-help-ignore-signal = set handling of SIG signal(s) to do nothing
15+
env-help-default-signal = reset handling of SIG signal(s) to the default action
16+
env-help-block-signal = block delivery of SIG signal(s) while running COMMAND
17+
env-help-list-signal-handling = list signal handling changes requested by preceding options
1518
1619
# Error messages
1720
env-error-missing-closing-quote = no terminating quote in -S string at position { $position } for quote '{ $quote }'

src/uu/env/locales/fr-FR.ftl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ env-help-debug = afficher des informations détaillées pour chaque étape de tr
1212
env-help-split-string = traiter et diviser S en arguments séparés ; utilisé pour passer plusieurs arguments sur les lignes shebang
1313
env-help-argv0 = Remplacer le zéroième argument passé à la commande en cours d'exécution. Sans cette option, une valeur par défaut de `command` est utilisée.
1414
env-help-ignore-signal = définir la gestion du/des signal/signaux SIG pour ne rien faire
15+
env-help-default-signal = réinitialiser la gestion du/des signal/signaux SIG à l'action par défaut
16+
env-help-block-signal = bloquer la livraison du/des signal/signaux SIG pendant l'exécution de COMMAND
17+
env-help-list-signal-handling = lister les traitements de signaux modifiés par les options précédentes
1518
1619
# Messages d'erreur
1720
env-error-missing-closing-quote = aucune guillemet de fermeture dans la chaîne -S à la position { $position } pour la guillemet '{ $quote }'

0 commit comments

Comments
 (0)