mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Report error when empty device name passed to readahead functions.
This commit is contained in:
parent
ce9636b26f
commit
3a2234162d
@ -1,5 +1,6 @@
|
||||
Version 1.02.24 -
|
||||
===================================
|
||||
Report error when empty device name passed to readahead functions.
|
||||
Fix minimum readahead debug message.
|
||||
|
||||
Version 1.02.23 - 5th December 2007
|
||||
|
@ -382,6 +382,11 @@ int get_dev_node_read_ahead(const char *dev_name, uint32_t *read_ahead)
|
||||
int fd;
|
||||
long read_ahead_long;
|
||||
|
||||
if (!*dev_name) {
|
||||
log_error("Empty device name passed to BLKRAGET");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((fd = _open_dev_node(dev_name)) < 0)
|
||||
return_0;
|
||||
|
||||
@ -406,6 +411,11 @@ static int _set_read_ahead(const char *dev_name, uint32_t read_ahead)
|
||||
int fd;
|
||||
long read_ahead_long = (long) read_ahead;
|
||||
|
||||
if (!*dev_name) {
|
||||
log_error("Empty device name passed to BLKRAGET");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((fd = _open_dev_node(dev_name)) < 0)
|
||||
return_0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user