summaryrefslogtreecommitdiffstats
path: root/lib/libgeom
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
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')
-rw-r--r--lib/libgeom/geom_util.c8
-rw-r--r--lib/libgeom/libgeom.36
2 files changed, 7 insertions, 7 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,
diff --git a/lib/libgeom/libgeom.3 b/lib/libgeom/libgeom.3
index bb67105..6feb558 100644
--- a/lib/libgeom/libgeom.3
+++ b/lib/libgeom/libgeom.3
@@ -92,7 +92,7 @@
.Fn gctl_dump "struct gctl_req *req" "FILE *f"
.Ss "Utility Functions"
.Ft int
-.Fn g_open "const char *name" "int write"
+.Fn g_open "const char *name" "int dowrite"
.Ft int
.Fn g_close "int fd"
.Ft off_t
@@ -108,7 +108,7 @@
.Ft int
.Fn g_get_name "const char *ident" "char *name" "size_t size"
.Ft int
-.Fn g_open_by_ident "const char *ident" "int write" "char *name" "size_t size"
+.Fn g_open_by_ident "const char *ident" "int dowrite" "char *name" "size_t size"
.Sh DESCRIPTION
The
.Nm geom
@@ -271,7 +271,7 @@ The
function opens the given provider and returns file descriptor number, which can
be used with other functions.
The
-.Fa write
+.Fa dowrite
argument indicates if operations that modify the provider (like
.Fn g_flush
or
OpenPOWER on IntegriCloud