Use 'dowrite' as an argument name instead of too general 'write'.

This commit is contained in:
Pawel Jakub Dawidek 2008-05-20 11:45:05 +00:00
parent 53eb39d1b8
commit 9ac6b8ae23
2 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
* Open the given provider and at least check if this is a block device. * Open the given provider and at least check if this is a block device.
*/ */
int int
g_open(const char *name, int write) g_open(const char *name, int dowrite)
{ {
char path[MAXPATHLEN]; char path[MAXPATHLEN];
int fd; int fd;
@ -56,7 +56,7 @@ g_open(const char *name, int write)
else else
snprintf(path, sizeof(path), "%s%s", _PATH_DEV, name); 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) if (fd == -1)
return (-1); return (-1);
/* Let try to get sectorsize, which will prove it is a GEOM provider. */ /* 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. * Find provider name by the given ID.
*/ */
int 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]; char lident[DISK_IDENT_SIZE];
struct gmesh mesh; 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(mp, &mesh.lg_class, lg_class) {
LIST_FOREACH(gp, &mp->lg_geom, lg_geom) { LIST_FOREACH(gp, &mp->lg_geom, lg_geom) {
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { 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) if (fd == -1)
continue; continue;
if (g_get_ident(fd, lident, if (g_get_ident(fd, lident,

View File

@ -92,7 +92,7 @@
.Fn gctl_dump "struct gctl_req *req" "FILE *f" .Fn gctl_dump "struct gctl_req *req" "FILE *f"
.Ss "Utility Functions" .Ss "Utility Functions"
.Ft int .Ft int
.Fn g_open "const char *name" "int write" .Fn g_open "const char *name" "int dowrite"
.Ft int .Ft int
.Fn g_close "int fd" .Fn g_close "int fd"
.Ft off_t .Ft off_t
@ -108,7 +108,7 @@
.Ft int .Ft int
.Fn g_get_name "const char *ident" "char *name" "size_t size" .Fn g_get_name "const char *ident" "char *name" "size_t size"
.Ft int .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 .Sh DESCRIPTION
The The
.Nm geom .Nm geom
@ -271,7 +271,7 @@ The
function opens the given provider and returns file descriptor number, which can function opens the given provider and returns file descriptor number, which can
be used with other functions. be used with other functions.
The The
.Fa write .Fa dowrite
argument indicates if operations that modify the provider (like argument indicates if operations that modify the provider (like
.Fn g_flush .Fn g_flush
or or