retitle 712078 fsck.btrfs not working due to argv[0] inspection
thank you

the problem you describe is much more general, as shown by this
comparison:

> $ /sbin/fsck.btrfs /dev/null
> btrfs: unknown token '/dev/null'
> usage: btrfs [--help] [--version] <group> [<group>...] <command> [<args>]
> [...]
> 
> $ /sbin/btrfsck /dev/null
> No valid Btrfs found on /dev/null

given /sbin/btrfsck and /sbin/btrfs are identical, it seems to me that
that binary decides what to do based on the name it is invoked as (just
like busybox). that failes when invoked as the symlink fsck.btrfs ->
btrfsck.

the trivial fix is to replace the /sbin/fsck.btrfs symlink by a shell
script:

> #!/bin/sh
> /sbin/btrfsck $@

a better thing to do might be to add fsck.btrfs to the list of accepted
names in order to start an fsck run.


best regards
chrysn

Attachment: signature.asc
Description: Digital signature

Reply via email to