Karel Zak [Mon, 17 Aug 2009 09:37:27 +0000 (11:37 +0200)]
dmesg: add -r to help output
On Tue, Aug 04, 2009 at 05:52:38PM +0200, Dalibor Straka wrote:
> while I was reading the source, I've noticed missing option in the
> help message for "-r". So I'm sending one-line patch for dmesg.
Reported-by: Dalibor Straka <dast@panelnet.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
mount: when a remount to rw fails, quit and return an error
A nice feature of mount is that when you attempt to mount a file
system read-write, and that fails because it can only be mounted
read-only, it goes ahead and retries the mount with the "ro" option
and returns success if that succeeds. However, this code path is also
followed when you are doing a remount for the sole purpose of changing
the mount from read-only to read-write - the change fails, but mount
returns success. Instead, check if we are attempting to remount and
fail out immediately, instead of retrying with the old "ro" option and
whee, happily "succeeding."
Signed-off-by: Valerie Aurora (Henson) <vaurora@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Daniel Drake [Tue, 14 Jul 2009 12:41:33 +0000 (14:41 +0200)]
switch_root: add subroot support
The current switch_root can only switch to a new root that is the root
of a mount point.
This patch adds support for "subroots", where the new root is
somewhere below a mount point. It does this by adding in a few extra
steps to chroot into the subroot after the enclosing partition has
been moved and entered.
This will be used by OLPC, who sort-of have 2 copies of Fedora stored
on a single partition under different directory trees, where the
initramfs decides which one to boot into
[kzak@redhat.com:
- port to the current u-l-ng switch_root code
- don't use static buffer for "dir" in get_parent_mount()]
CC: Peter Jones <pjones@redhat.com> Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Kay Sievers [Fri, 3 Jul 2009 21:18:36 +0000 (23:18 +0200)]
build-sys: reverse shlibs installation
[kzak@redhat.com:
Unfortunately, libtool does not provide a way how to install real
libraries to /lib and devel libs (symlinks) to /usr/lib. We have
to use install hooks to move these files.
Currently we install to /lib and move devel files to /usr/lib. This
concept is wrong, because the libdir= in .la libtool files must to
match with the place where we install the devel .so libs. It means we
have to install everything to /usr/lib and then move (by install hook)
the real .so libs to /lib.
This change is necessary to fix "make install", otherwise the install
process will not work in clean change root. ]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid: Don't run uuidd if it would fail due to permission problems
Some distributions don't like installing uuidd setuid or setgid. So
if the setuid or setigid bit is not set with uuidd, and the current
process does not have write access to the UUIDD work directory, don't
try running uuidd, since it won't work properly.
libuuid, uuidd: Avoid infinite loop while reading from the socket fd
If for some reason the uuidd daemon or the process calling uuidd
exited unexpectely, the read_all() function would end up looping
forever, either in uuidd or in libuuid. Fix this terminating the loop
if no data can be read after five tries to read from the file
descriptor.
uuidd: Avoid closing the server socket when calling create_daemon()
In the event that file descriptors 0-2 are closed when uuidd is
started, the server socket could be created as a file descriptor that
will get closed when create_daemon() tries detaching the uuidd daemon
from its controlling tty. Avoid this case by using dup(2).
Theodore Ts'o [Tue, 30 Jun 2009 01:19:28 +0000 (21:19 -0400)]
libuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd
When closing all of the file descriptors before starting uuidd, make
sure file descriptors 0, 1, and 2 are reserved by opening /dev/null.
This prevents strange bugs caused by assumptions regarding file
descriptors <= 2 as being special.
Karel Zak [Tue, 30 Jun 2009 11:18:26 +0000 (13:18 +0200)]
libuuid: fix $libdir in uuid.pc
The -L<dir> gcc option is for directories to be searched for .so/.a
files. It means the directory with development stuff. We have devel
libs in /usr/lib[64].
The side effect is that pkg-config does not return -L with standard
system directories (so make(1) output is more readable and shorter).
Karel Zak [Tue, 30 Jun 2009 11:11:05 +0000 (13:11 +0200)]
libblkid: fix $libdir in blkid.pc
The -L<dir> gcc option is for directories to be searched for .so/.a
files. It means the directory with development stuff. We have devel
libs in /usr/lib[64].
The side effect is that pkg-config does not return -L with standard
system directories (so make(1) output is more readable and shorter).
Jeff Mahoney [Mon, 29 Jun 2009 21:05:36 +0000 (23:05 +0200)]
raw: Use the RAW_SETBIND ioctl without stat'ing the raw# file
The in-kernel ioctl code creates a raw# device on-demand. udev will create
the /dev/raw/raw# file when the device is created automatically.
The current raw userspace code wants to stat the file before using it,
which is unnecessary for setting up the raw device.
This patch stats the file only when query() is called as a singleton, and
it's doubtful it's needed even there. I modified as little code as I could,
though.
Tilman Schmidt [Sun, 10 May 2009 11:54:51 +0000 (13:54 +0200)]
ldattach: add N_PPS support
Add support for a line discipline name "PPS" selecting the
Pulse Per Second line discipline N_PPS (18). The number has been
reserved since kernel release 2.6.28, and the implementation is
finally going to be submitted for kernel release 2.6.31.