mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Use 'dowrite' as an argument name instead of too general 'write'.
This commit is contained in:
parent
53eb39d1b8
commit
9ac6b8ae23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179152
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user