Commit graph

7330 commits

Author SHA1 Message Date
Sylvestre Ledru
3e39209078
Merge pull request #3315 from jfinkels/uucore-parse-time-uppercase
uucore: no uppercase suffixes in parse_time
2022-03-26 19:17:32 +01:00
Jeffrey Finkelstein
6a8ce447b7 uucore: no uppercase suffixes in parse_time
Disallow uppercase unit suffixes "S", "M", "H", and "D" in
`uucore::parse_time::from_str()` to match the behavior of GNU `sleep`
and `timeout`.
2022-03-26 10:39:00 -04:00
Sylvestre Ledru
5fba2a78da
Merge pull request #3293 from jfinkels/dd-conv-block-helper-remove-input
dd: create ConversionMode to simplify conversion, blocking, and unblocking
2022-03-26 10:10:48 +01:00
Sylvestre Ledru
2e476cfebd
Merge pull request #3307 from uutils/dependabot/cargo/redox_syscall-0.2.12
build(deps): bump redox_syscall from 0.2.10 to 0.2.12
2022-03-26 10:10:31 +01:00
Sylvestre Ledru
fbb64b9c5c mkdir: gnu compat: add support of mkdir -p foo/. 2022-03-25 21:35:27 +01:00
dependabot[bot]
f6981ba3f0
build(deps): bump redox_syscall from 0.2.10 to 0.2.12
Bumps redox_syscall from 0.2.10 to 0.2.12.

---
updated-dependencies:
- dependency-name: redox_syscall
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 20:02:46 +00:00
Jeffrey Finkelstein
f856bfc479 dd: move ConversionMode parsing to parseargs mod.
Move the code for parsing the `ConversionMode` to use up to the
`parseargs` module. This location makes more sense for it because the
conversion mode can be determined entirely from the command-line
arguments at the time of parsing just like the other parameters. Using
an enum for this purpose also eliminates the amount of code we need
later on.
2022-03-25 20:56:38 +01:00
Jeffrey Finkelstein
b98bccf9cc dd: move ConversionMode parsing to dd.rs
Move parsing of the `ConversionMode` outside of
`conv_block_unblock_helper()` and up to the code that calls it.
2022-03-25 20:56:38 +01:00
Jeffrey Finkelstein
bd626df70e dd: replace cascading if/else if with enum match
Replace a cascading `if/else if` chain in `conv_block_unblock_helper()`
with a match statement on a new enum, `ConversionMode`, that enumerates
the various modes in which `dd` can operate.
2022-03-25 20:56:38 +01:00
Terts Diepraam
6b8ab37ad9
Merge pull request #3308 from sylvestre/ci
CI: Force the rustc nightly version to fix issue 3305
2022-03-25 20:36:56 +01:00
Sylvestre Ledru
9e86e56668
Remove a comment to retrigger the CI 2022-03-25 15:28:45 +01:00
Sylvestre Ledru
22e06c2458 also fix coverage 2022-03-25 12:06:41 +01:00
Sylvestre Ledru
c4d89ab146 ci try to fix the error ? 2022-03-25 11:01:05 +01:00
Sylvestre Ledru
2acac0d558 CI: Force the rustc nightly version to fix issue 3305 2022-03-25 09:41:01 +01:00
Sylvestre Ledru
0ffc162daa
Merge pull request #3301 from sylvestre/assert_eq
use assert_eq instead of x == y. Better output in case of error
2022-03-24 08:18:08 +01:00
Sylvestre Ledru
fe648b2666
Merge pull request #3297 from jfinkels/timeout-invalid-signal
timeout: produce usage error on invalid signal
2022-03-23 21:05:34 +01:00
Sylvestre Ledru
33c49666c3
nproc: make tests/misc/nproc-override.sh pass by implementing OMP_NUM_THREADS=X,Y,Z (#3296)
+ nproc tests: use assert_eq when comparing the two values

Co-authored-by: jfinkels <jfinkels@users.noreply.github.com>
2022-03-23 12:12:54 +01:00
Sylvestre Ledru
ba83e5e901 use assert_eq instead of x == y. Better output in case of error 2022-03-23 10:41:31 +01:00
Jeffrey Finkelstein
760a15aa74 timeout: produce usage error on invalid signal
Produce a usage error on an invalid signal argument. For example,

    $ timeout --signal=invalid 1 sleep 0
    timeout: 'invalid': invalid signal
    Try 'timeout --help' for more information.
2022-03-23 08:39:55 +01:00
Sylvestre Ledru
1cd72a621a
Merge pull request #3299 from jfinkels/clippy-fixes-2022-03-22
clippy fixes from nightly rust
2022-03-23 08:39:20 +01:00
Jeffrey Finkelstein
e357d2650c clippy fixes from nightly rust 2022-03-22 21:44:33 -04:00
Terts Diepraam
fc1fa8d1f7
Merge pull request #3027 from shoriminimoe/2986-cp
cp: only allow directory for -t
2022-03-22 23:08:54 +01:00
Sylvestre Ledru
291b889d66
Merge pull request #3256 from chordtoll/iseek-oseek
dd: implement iseek + oseek flags
2022-03-22 20:31:05 +01:00
Sylvestre Ledru
c19a8feb22
Merge pull request #3291 from devnexen/illumos_build_fix
fsext solaris/illumos build fix
2022-03-22 20:07:47 +01:00
Sylvestre Ledru
8044981df0
Merge pull request #3289 from uutils/dependabot/cargo/ouroboros-0.15.0
build(deps): bump ouroboros from 0.14.2 to 0.15.0
2022-03-22 08:08:13 +01:00
Sylvestre Ledru
b50d96e193
Merge pull request #3292 from jfinkels/uucore-parse-time-negative-interval
uucore: error on negative interval in parse_time::from_str()
2022-03-22 08:07:58 +01:00
Jeffrey Finkelstein
f4af226820 uucore: error on negative interval in parse_time
Return an error when a negative interval is provided as the argument
to `uucore::parse_time::from_str()`, since a `Duration` should only be
non-negative.
2022-03-21 21:11:31 -04:00
David Carlier
d8102503bf fsext solaris/illumos build fix 2022-03-21 23:20:22 +00:00
Terts Diepraam
5eeac5881a
Merge pull request #3285 from sylvestre/ls_aA
ls: when -aA are provided, the order matters
2022-03-21 18:14:13 +01:00
Terts Diepraam
e9a6cf043f
Merge pull request #3286 from sylvestre/nproc-2
nproc: add the full support of OMP_THREAD_LIMIT
2022-03-21 18:11:41 +01:00
dependabot[bot]
2024cc37e6
build(deps): bump ouroboros from 0.14.2 to 0.15.0
Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.14.2 to 0.15.0.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/compare/0.14.2...0.15.0)

---
updated-dependencies:
- dependency-name: ouroboros
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 16:50:55 +00:00
Sylvestre Ledru
7963287c6c
Merge pull request #3282 from uutils/dependabot/cargo/libc-0.2.121
build(deps): bump libc from 0.2.113 to 0.2.121
2022-03-21 17:49:11 +01:00
Sylvestre Ledru
4942e519fa nproc: add the full support of OMP_THREAD_LIMIT 2022-03-21 13:46:22 +01:00
Sylvestre Ledru
187bddb6af ls: support multiple -a or -A 2022-03-21 13:32:23 +01:00
Sylvestre Ledru
435c983b36
Merge pull request #3087 from water-ghosts/printf-general
printf - Update %g formatting to match GNU
2022-03-21 13:23:28 +01:00
Sylvestre Ledru
ce28aa8b8a
Merge pull request #3287 from cakebaker/missing_spaces
sort: add two missing spaces in help texts
2022-03-21 13:14:28 +01:00
Sylvestre Ledru
d3e2ad2d50
Merge pull request #3283 from jfinkels/timeout-usage-error
timeout: give usage error on invalid time interval
2022-03-21 09:27:58 +01:00
Sylvestre Ledru
0bc9a05846
Merge pull request #3284 from jfinkels/sleep-usage-error
sleep: give usage error on invalid time interval
2022-03-21 09:27:47 +01:00
Sylvestre Ledru
3009c73e9c
ls -aA: Add a comment 2022-03-21 09:13:56 +01:00
Daniel Hofstetter
a1d6a8f17a sort: add two missing spaces in help texts 2022-03-21 09:13:33 +01:00
Sylvestre Ledru
af8726af43 ls: when -aA are provided, the order matters 2022-03-20 23:23:17 +01:00
Jeffrey Finkelstein
c39c917db7 sleep: give usage error on invalid time interval
For example,

    $ sleep xyz
    sleep: invalid time interval 'xyz'
    Try 'sleep --help' for more information.

This matches the behavior of GNU sleep.
2022-03-20 15:21:50 -04:00
Jeffrey Finkelstein
e849aaf846 timeout: give usage error on invalid time interval 2022-03-20 15:16:03 -04:00
dependabot[bot]
34d2d1d05e
build(deps): bump libc from 0.2.113 to 0.2.121
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.113 to 0.2.121.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.113...0.2.121)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 18:14:52 +00:00
dependabot[bot]
0f4a2eae3b
build(deps): bump clap_complete from 3.0.4 to 3.1.1
Bumps [clap_complete](https://github.com/clap-rs/clap) from 3.0.4 to 3.1.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v3.0.4...clap_complete-v3.1.1)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 16:46:38 +00:00
dependabot[bot]
aea30bd4a7
build(deps): bump ioctl-sys from 0.6.0 to 0.8.0
Bumps [ioctl-sys](https://github.com/jmesmon/ioctl) from 0.6.0 to 0.8.0.
- [Release notes](https://github.com/jmesmon/ioctl/releases)
- [Commits](https://github.com/jmesmon/ioctl/compare/ioctl-sys-0.6.0...ioctl-sys-0.8.0)

---
updated-dependencies:
- dependency-name: ioctl-sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-20 16:46:37 +00:00
Sylvestre Ledru
04b219bdef
Merge pull request #3229 from uutils/dependabot/cargo/clap-3.1.6
build(deps): bump clap from 3.0.10 to 3.1.6
2022-03-20 17:44:33 +01:00
Sylvestre Ledru
b55da29c53
Merge pull request #3278 from jfinkels/split-line-bytes-empty-file
split: avoid writing final empty chunk with -C
2022-03-20 17:41:26 +01:00
Jeffrey Finkelstein
b79ff6b4fd split: avoid writing final empty chunk with -C
Fix a bug in which a final empty file was written when using `split
--line-bytes` mode.
2022-03-20 09:30:58 -04:00
Sam Caldwell
f40fecf86d Add UError impl for clap::Error 2022-03-20 13:50:39 +01:00