followed Ingo and Marcus' suggestion : be nice when called on file names shorter than raw, or when called in the device directory
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24653 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -478,7 +478,9 @@ main(int argc, const char *const *argv)
|
|||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
|
|
||||||
// get a partition info
|
// get a partition info
|
||||||
if (!noPartition && strncmp("/raw", fileName + strlen(fileName) - 4, 4)) {
|
if (!noPartition
|
||||||
|
&& strlen(fileName) >= 3
|
||||||
|
&& strncmp("raw", fileName + strlen(fileName) - 3, 3)) {
|
||||||
partition_info partitionInfo;
|
partition_info partitionInfo;
|
||||||
if (ioctl(fd, B_GET_PARTITION_INFO, &partitionInfo) == 0) {
|
if (ioctl(fd, B_GET_PARTITION_INFO, &partitionInfo) == 0) {
|
||||||
partitionOffset = partitionInfo.offset;
|
partitionOffset = partitionInfo.offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user