summaryrefslogtreecommitdiffstats
path: root/lib/libgeom/geom_util.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2008-05-20 11:45:05 +0000
committerpjd <pjd@FreeBSD.org>2008-05-20 11:45:05 +0000
commit03149c9265fd3581f27f214779ae7d01dc97265e (patch)
tree56f096565608e85fbe717bec3dd8473d22dae328 /lib/libgeom/geom_util.c
parente29d32fc805fdf8b3ac99f3dbcd56f3bf7e80320 (diff)
downloadFreeBSD-src-03149c9265fd3581f27f214779ae7d01dc97265e.zip
FreeBSD-src-03149c9265fd3581f27f214779ae7d01dc97265e.tar.gz
Use 'dowrite' as an argument name instead of too general 'write'.
Diffstat (limited to 'lib/libgeom/geom_util.c')
-rw-r--r--lib/libgeom/geom_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libgeom/geom_util.c b/lib/libgeom/geom_util.c
index fa7d89a..c596178 100644
--- a/lib/libgeom/geom_util.c
+++ b/lib/libgeom/geom_util.c
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
* Open the given provider and at least check if this is a block device.
*/
int
-g_open(const char *name, int write)
+g_open(const char *name, int dowrite)
{
char path[MAXPATHLEN];
int fd;
@@ -56,7 +56,7 @@ g_open(const char *name, int write)
else
snprintf(path, sizeof(path), "%s%s", _PATH_DEV, name);
- fd = open(path, write ? O_RDWR : O_RDONLY);
+ fd = open(path, dowrite ? O_RDWR : O_RDONLY);
if (fd == -1)
return (-1);
/* Let try to get sectorsize, which will prove it is a GEOM provider. */
@@ -183,7 +183,7 @@ g_get_name(const char *ident, char *name, size_t size)
* Find provider name by the given ID.
*/
int
-g_open_by_ident(const char *ident, int write, char *name, size_t size)
+g_open_by_ident(const char *ident, int dowrite, char *name, size_t size)
{
char lident[DISK_IDENT_SIZE];
struct gmesh mesh;
@@ -204,7 +204,7 @@ g_open_by_ident(const char *ident, int write, char *name, size_t size)
LIST_FOREACH(mp, &mesh.lg_class, lg_class) {
LIST_FOREACH(gp, &mp->lg_geom, lg_geom) {
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
- fd = g_open(pp->lg_name, write);
+ fd = g_open(pp->lg_name, dowrite);
if (fd == -1)
continue;
if (g_get_ident(fd, lident,
OpenPOWER on IntegriCloud