| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
We use the code from include/ and lib/ on many places, so use public
domain if possible or LGPL for code copied from libs.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Add a function, and necessary symbols, to convert scsi type id's
to name strings.
Reference: http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/5994
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
This is a more generic place for this ioctl.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
|
|
|
|
| |
We should have the most basic of checks in this library to see whether or not a block device is being used.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
|
|
|
|
| |
And replace the current archaic logic of is_ide_cdrom_or_tape().
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
|
|
|
|
| |
Fix to `warning: undefined preprocessor identifier' messages.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
This function uses the BLKPBSZGET ioctl to get the physical block size
of the device.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This functions returns the status of the device's alignment. It will
be 0 when aligned, otherwise return the offset.
[kzak@redhat.com: - returns 0 if the ioctl failed]
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The _IO macro is defined in sys/ioccom.h on various platforms. However,
on Solaris it isn't included by ioctl.h, so include it explicitly if
available.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
| |
Reported-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
[kzak@redhat.com: - cleanup
- add long options
- add note about DM to the man page
- use err.h and nls.h]
Signed-off-by: Hajime Taira <htaira@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
.. and cleanup blkdev_get_size() usage in libblkid.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel 2.6.32-rc4 (kvm):
# blockdev -v --getss --getpbsz --getiomin --getioopt --getmaxsect --getalignoff /dev/sda
get logical block (sector) size: 512
get physical block (sector) size: 512
get minimum I/O size: 512
get optimal I/O size: 0
get max sectors per request: 1024
get alignment offset: 0
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
new options:
--getpbsz get physical block (sector) size
--getiomin get minimum I/O size
--getioopt get optimal I/O size
--getalignoff get alignment offset
--getmaxsect get max sectors per request
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
This odd ioctl is unsupported in the current 2.4 and 2.6 mainline.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to a change in kernel behaviour when opening CDROM devices,
we need to retry the open/mount call when ENOMEDIUM is returned.
Explanation from Tejun Heo:
Okay, the difference is from the addition of cdrom_get_media_event()
call to both sr_drive_status() and ide_cdrom_drive_status().
Previously, the cdrom driver can't differentiate between tray closed
w/ no media and tray open and always returned tray open, which
triggers close and retry in the open logic which probably have delayed
things enough to get the media recognized.
Now the cdrom driver can discern between tray closed w/o media and
device not ready for other reasons and returns -ENOMEDIUM on the
former. This is all good and dandy but the problem seems that some
drives report no media right after the tray is closed but it hasn't
properly detected the media yet.
It seems the only way to work around the problem is via sensible
retries (e.g. try three times 5 secs apart) and I don't think we can
add that type of retry logic into cdrom open path. Please note that
the previous logic wasn't water proof. Some drives can take longer to
recognize the media is there and could have failed the in-kernel retry
too. Also, reading the media can take quite some time and during that
period the drive reports media present but device not ready. The
driver will retry the command (e.g. READ TOC for open) five times but
all of them can fail w/ EMEDIUMTYPE.
[kzak@redhat.com: - add CRDOM_NOMEDIUM_RETRIES to blkdev.h
- add verbose message to mount.c]
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Now we duplicate BLK* ioctls on many places... This patch also
fix BLKGETSIZE64 usage in dependence on kernel version.
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Stefan Krah <stefan@bytereef.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|