Block protocol: use own [RW]_BIT definitions

The original R_BIT and W_BIT definitions have nothing to do with the
way these bits are used. Their distinct usage is more apparent when
they have different names.

Change-Id: Ia984457f900078b2e3502ceed565fead4e5bb965
This commit is contained in:
David van Moolenbroek
2013-07-27 00:49:49 +02:00
committed by Lionel Sambuc
parent 3fb735cc74
commit 113635b019
11 changed files with 21 additions and 12 deletions

View File

@@ -169,7 +169,7 @@ static void reopen_device(dev_t minor)
memset(&m, 0, sizeof(m));
m.m_type = BDEV_OPEN;
m.BDEV_MINOR = minor;
m.BDEV_ACCESS = (may_write) ? (R_BIT | W_BIT) : R_BIT;
m.BDEV_ACCESS = (may_write) ? (BDEV_R_BIT | BDEV_W_BIT) : BDEV_R_BIT;
m.BDEV_ID = 0;
(void) sendrec(driver_endpt, &m);
@@ -1025,7 +1025,7 @@ static void open_device(dev_t minor)
memset(&m, 0, sizeof(m));
m.m_type = BDEV_OPEN;
m.BDEV_MINOR = minor;
m.BDEV_ACCESS = may_write ? (R_BIT | W_BIT) : R_BIT;
m.BDEV_ACCESS = may_write ? (BDEV_R_BIT | BDEV_W_BIT) : BDEV_R_BIT;
m.BDEV_ID = lrand48();
sendrec_driver(&m, OK, &res);