Allow NULL for startp and/or countp in bus_get_resource() so that you can
get one of the two without having to use a dummy variable.
This commit is contained in:
parent
32fc781e06
commit
5ab0514321
@ -1333,8 +1333,10 @@ pci_get_resource(device_t dev, device_t child, int type, int rid,
|
||||
if (!rle)
|
||||
return ENOENT;
|
||||
|
||||
*startp = rle->start;
|
||||
*countp = rle->count;
|
||||
if (startp)
|
||||
*startp = rle->start;
|
||||
if (countp)
|
||||
*countp = rle->count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -869,8 +869,10 @@ isa_get_resource(device_t dev, device_t child, int type, int rid,
|
||||
if (!rle)
|
||||
return ENOENT;
|
||||
|
||||
*startp = rle->start;
|
||||
*countp = rle->count;
|
||||
if (startp)
|
||||
*startp = rle->start;
|
||||
if (countp)
|
||||
*countp = rle->count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -178,8 +178,10 @@ pccard_get_resource(device_t dev, device_t child, int type, int rid,
|
||||
if (!rle)
|
||||
return ENOENT;
|
||||
|
||||
*startp = rle->start;
|
||||
*countp = rle->count;
|
||||
if (startp)
|
||||
*startp = rle->start;
|
||||
if (countp)
|
||||
*countp = rle->count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1333,8 +1333,10 @@ pci_get_resource(device_t dev, device_t child, int type, int rid,
|
||||
if (!rle)
|
||||
return ENOENT;
|
||||
|
||||
*startp = rle->start;
|
||||
*countp = rle->count;
|
||||
if (startp)
|
||||
*startp = rle->start;
|
||||
if (countp)
|
||||
*countp = rle->count;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user