Age | Commit message (Collapse) | Author |
|
Without LFS, stat fails with -EOVERFLOW on devices with major:minor
numbers that don't fit within 8 bits on 32-bit architecutres. This
patch turns on LFS to allow that, fixing a bringup but on a new
platform.
BUG=chromium:464024
TEST=Booted onto a machine and successfully ran rootdev with a large
major:minor number.
Change-Id: I3dfe698e65366f4608705f56894988d2643e375f
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/258550
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
|
|
The current code requires rootdev to be in $PWD which fails when we
build out of tree (like the ebuild).
BUG=chromium:441571
TEST=`FEATURES=test emerge-link rootdev` passes
Change-Id: I99173ceb557099c20b43f5a31b87107a144efa20
Reviewed-on: https://chromium-review.googlesource.com/234921
Trybot-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
The rootdev program was printing the path buffer even when the library
call failed. In that case, the buffer most likely is uninitialized.
Make sure we seed it with a NUL byte so it's always valid.
BUG=chromium:441571
TEST=`FEATURES=test emerge-link rootdev` passes
Change-Id: I00d334376de9bedee0a3fac3b1a74e48237c06b7
Reviewed-on: https://chromium-review.googlesource.com/234920
Trybot-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
If the system's stat buffer is broken and doesn't declare st_dev as a
dev_t, we hit a build failure when we try to pass it into a func that
expects a dev_t.
Add some checks to handle this case. It produces the same code on sane
ABIs, so other than ugliness, it should be fine.
BUG=chromium:358419
TEST=`emerge-link rootdev` produces same code
TEST=`emerge-daisy rootdev` produces same code
TEST=`emerge-mipsel-o32-generic rootdev` now works
Change-Id: I956436e0c40318c8f2ac61b2e202ec739132c245
Reviewed-on: https://chromium-review.googlesource.com/192550
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
Make sure we respect CPPFLAGS and don't hardcode
BUG=None
TEST=`emerge-x86-alex rootdev` uses right flags
Change-Id: I668af9e02b842ddc54f60e07d313a564cc927413
Reviewed-on: https://chromium-review.googlesource.com/175522
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
We create a lib out of rootdev.c, so have our main program use it rather
than duplicate the code in the main program.
BUG=None
TEST=`emerge-x86-alex rootdev` still works and rootdev is linked against the prog (and works)
Change-Id: If649007ddb9499f2217ad0af3f1d30115587dd3d
Reviewed-on: https://chromium-review.googlesource.com/175521
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
This will allow us to avoid doing a git clone.
BUG=None
TEST=`emerge-x86-alex rootdev` still works
Change-Id: I2515981c5aa426eebecc6333d8ae7b50276ae577
Reviewed-on: https://chromium-review.googlesource.com/175520
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
|
|
Some toolchains are confused by have a local variable with the same
name as a function. FIXIT!
BUG=None
TEST=compilashunz
Change-Id: Id7befbcfc9c2cbcd14f4a229cbc8687e1f7ad72c
Reviewed-on: https://gerrit.chromium.org/gerrit/66294
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
|
|
The intent of the rootdev_get_device_slave is to allow the slave and
the device to be the same string but it is not required. Added a
test for the case where they are the same string to not do the
strncpy.
Linux has vixed the problem of a limited number of stacked devices,
so I fixed the comment that referred to it.
BUG=chromium:259893
TEST=rootdev -s
Change-Id: I04d84799e77c678f1330e1bcf72cddaf9ac68c4c
Reviewed-on: https://gerrit.chromium.org/gerrit/61707
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
|
|
Rootdev only went down one level when traversing the device tree.
With the addition of the bootcache device mapper, we need to
go multiple levels for the -s option for rootdev.
BUG=chromium-os:25441
TEST=used it with bootcache to find boot device.
Change-Id: Ica82dc150e403d0e49e4d8074c0b920b20e4cccc
Reviewed-on: https://gerrit.chromium.org/gerrit/31851
Commit-Ready: Paul Taysom <taysom@chromium.org>
Reviewed-by: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
|
|
The mmcblk driver of the 3.0.8 kernel adds mmcblk0boot0 and mmcblk0boot1
directories under /sys/block or /sys/block/mmcblk0. I have seen it both ways.
The device symlink in those directories points to "../../mmcblk0" which
points to the grandparent directory.
When rootdev scans /sys/block looking for a device that matches "/", it
can fall into this loop and recurse until failure.
While a proper fix would detect loops to prevent recursion, that adds
considerable complexity to the directory scan.
This relatively simple solution limits recursion depth to 5 to prevent
infinitely looping. It will fail to find device matches beyond 5 levels
of directories, but we are nowhere near that in today's systems. We find
matches at level 3 as best I can tell.
BUG=chromium-os:22855
TEST=Run rootdev and check for failures.
Change-Id: I9ef3aa0a6d6f8143dd0b9e012ba4bb4adfa0c73b
Reviewed-on: https://gerrit.chromium.org/gerrit/11575
Reviewed-by: Will Drewry <wad@chromium.org>
Commit-Ready: Bryan Freed <bfreed@chromium.org>
Tested-by: Bryan Freed <bfreed@chromium.org>
|
|
Multiple changes:
- Ensure the -d flag trims off all of the partition info and only if there is a partition
- Add -c, device node creation for platform-agnostic /dev/ROOT, /dev/ROOT0 and /dev/ROOT1
- Add -r, resolve the first slave if the device is a device-mapper device
- Add -s, create a symlink from the found device to /dev/ACTIVE_ROOT
- Adds short-circuiting if /dev/ACTIVE_ROOT exists to both dm resolution and
normal lookups
- Add support for building a library with a reusable header and interfaces
I'll follow this up with a change to install <rootdev/rootdev.h> and the .so in
the ebuild if the interface is at all interesting. If prefered, I can just add:
rootdev -s -r to chromeos_startup, then AU can just rely on readlink(/dev/ACTIVE_ROOT).
BUG=chromium-os:5988
TEST=built for x86-generic testing with vroot: -r, -s, -c, -d and combos
switching to non-vroot to test now
can someone test arm for me?
Change-Id: Ibab8072afb012ea77d457517f1849e0917d02892
Review URL: http://codereview.chromium.org/3141038
|
|
Change-Id: I2afbb0a8546f48224292433e2efcf0a868c7a1c6
Review URL: http://codereview.chromium.org/2814040
Patch from Kobi Cohen-Arazi <kobic@codeaurora.org>.
|
|
deleted: files
Review URL: http://codereview.chromium.org/2815007
|
|
new file: inherit-review-settings-ok
Review URL: http://codereview.chromium.org/2816005
|
|
* Move all files from files/ to .
* Fix LICENCE symlink
* Create files -> . symlink to remain backwards compatible
Review URL: http://codereview.chromium.org/2847007
|
|
|