summaryrefslogtreecommitdiff
path: root/linux/dev/glue
diff options
context:
space:
mode:
Diffstat (limited to 'linux/dev/glue')
-rw-r--r--linux/dev/glue/block.c20
-rw-r--r--linux/dev/glue/misc.c22
2 files changed, 21 insertions, 21 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index c995638..dfd2ee9 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -231,12 +231,12 @@ register_blkdev (unsigned major, const char *name,
for (major = MAX_BLKDEV - 1; major > 0; major--)
if (blkdevs[major].fops == NULL)
goto out;
- return -LINUX_EBUSY;
+ return -EBUSY;
}
if (major >= MAX_BLKDEV)
- return -LINUX_EINVAL;
+ return -EINVAL;
if (blkdevs[major].fops && blkdevs[major].fops != fops)
- return -LINUX_EBUSY;
+ return -EBUSY;
out:
blkdevs[major].name = name;
@@ -255,9 +255,9 @@ int
unregister_blkdev (unsigned major, const char *name)
{
if (major >= MAX_BLKDEV)
- return -LINUX_EINVAL;
+ return -EINVAL;
if (! blkdevs[major].fops || strcmp (blkdevs[major].name, name))
- return -LINUX_EINVAL;
+ return -EINVAL;
blkdevs[major].fops = NULL;
if (blkdevs[major].labels)
{
@@ -525,7 +525,7 @@ rdwr_partial (int rw, kdev_t dev, loff_t *off,
}
bh->b_data = alloc_buffer (bh->b_size);
if (! bh->b_data)
- return -LINUX_ENOMEM;
+ return -ENOMEM;
ll_rw_block (READ, 1, &bh);
wait_on_buffer (bh);
if (buffer_uptodate (bh))
@@ -544,7 +544,7 @@ rdwr_partial (int rw, kdev_t dev, loff_t *off,
wait_on_buffer (bh);
if (! buffer_uptodate (bh))
{
- err = -LINUX_EIO;
+ err = -EIO;
goto out;
}
}
@@ -553,7 +553,7 @@ rdwr_partial (int rw, kdev_t dev, loff_t *off,
*off += c;
}
else
- err = -LINUX_EIO;
+ err = -EIO;
out:
free_buffer (bh->b_data, bh->b_size);
return err;
@@ -606,7 +606,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
bh->b_data = alloc_buffer (cc);
if (! bh->b_data)
{
- err = -LINUX_ENOMEM;
+ err = -ENOMEM;
break;
}
if (rw == WRITE)
@@ -630,7 +630,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
&& rw == READ && test_bit (BH_Bounce, &bh->b_state))
memcpy (*buf + cc, bh->b_data, bh->b_size);
else if (! err && ! buffer_uptodate (bh))
- err = -LINUX_EIO;
+ err = -EIO;
if (test_bit (BH_Bounce, &bh->b_state))
free_buffer (bh->b_data, bh->b_size);
}
diff --git a/linux/dev/glue/misc.c b/linux/dev/glue/misc.c
index 98c8248..f25d501 100644
--- a/linux/dev/glue/misc.c
+++ b/linux/dev/glue/misc.c
@@ -82,34 +82,34 @@ linux_to_mach_error (int err)
case 0:
return D_SUCCESS;
- case -LINUX_EPERM:
+ case -EPERM:
return D_INVALID_OPERATION;
- case -LINUX_EIO:
+ case -EIO:
return D_IO_ERROR;
- case -LINUX_ENXIO:
+ case -ENXIO:
return D_NO_SUCH_DEVICE;
- case -LINUX_EACCES:
+ case -EACCES:
return D_INVALID_OPERATION;
- case -LINUX_EFAULT:
+ case -EFAULT:
return D_INVALID_SIZE;
- case -LINUX_EBUSY:
+ case -EBUSY:
return D_ALREADY_OPEN;
- case -LINUX_EINVAL:
+ case -EINVAL:
return D_INVALID_SIZE;
- case -LINUX_EROFS:
+ case -EROFS:
return D_READ_ONLY;
- case -LINUX_EWOULDBLOCK:
+ case -EWOULDBLOCK:
return D_WOULD_BLOCK;
- case -LINUX_ENOMEM:
+ case -ENOMEM:
return D_NO_MEMORY;
default:
@@ -146,7 +146,7 @@ verify_area (int rw, const void *p, unsigned long size)
|| (entry->protection & prot) != prot)
{
vm_map_unlock_read (current_map ());
- return -LINUX_EFAULT;
+ return -EFAULT;
}
if (entry->vme_end - entry->vme_start >= len)
break;