Bug 7334 - mdev help message is misleading - mdev.seq
Summary: mdev help message is misleading - mdev.seq
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.21.x
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-30 09:32 UTC by Arkadiusz Miskiewicz
Modified: 2014-09-08 16:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadiusz Miskiewicz 2014-08-30 09:32:14 UTC
"If /dev/mdev.seq file exists, mdev will wait for its value
to match $SEQNUM variable. This prevents plug/unplug races.
To activate this feature, create empty /dev/mdev.seq at boot."

So create empty /dev/mdev.seq ... but the code expects the file to contain new line

        if (seqbuf[0] == '\n') {
            /* seed file: write out seq ASAP */
            xwrite_str(seq_fd, seq);
            xlseek(seq_fd, 0, SEEK_SET);
            dbg2("first seq written");
            break;
        }


So help message should be like "create /dev/mdev.seq at boot containing
one new line only"
Comment 1 Arkadiusz Miskiewicz 2014-08-30 09:33:12 UTC
Or even better accept empty file the same way as file containing "\n".
Comment 2 Denys Vlasenko 2014-09-08 16:20:00 UTC
Fixed in git, thanks!