From ce30b2df04c96797cd11914a9c12b43f0cc307f8 Mon Sep 17 00:00:00 2001 From: Mike Shaver Date: Tue, 12 Aug 1997 18:43:17 +0000 Subject: It now compiles, but almost certainly doesn't work. --- drivers/sgi/char/usema.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/sgi') diff --git a/drivers/sgi/char/usema.c b/drivers/sgi/char/usema.c index 416dc167e..a0e459f6f 100644 --- a/drivers/sgi/char/usema.c +++ b/drivers/sgi/char/usema.c @@ -38,6 +38,7 @@ #include #include #include +#include #define NUM_USEMAS (1 << MINORBITS - 1) #define USEMA_FORMAT "/dev/usema%d" @@ -80,7 +81,7 @@ sgi_usemaclone_open(struct inode *inode, struct file *filp) * allocating and pull a switcheroo on filp->d_entry. */ sprintf(semaname, USEMA_FORMAT, semanum); - semadentry = namei(semaname, 0); + semadentry = namei(semaname); if (!semadentry) { /* This Shouldn't Happen(tm) */ printk("[%s:%d] usemaclone_open: can't find dentry for %s", @@ -173,7 +174,7 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd, case UIOCNOIBLOCK: /* XXX maybe? */ case UIOCBLOCK: { /* Block this process on the semaphore */ - us_attach *attach = (us_attach *)arg; + usattach_t *attach = (usattach_t *)arg; int semanum; retval = verify_area(VERIFY_READ, attach, sizeof(usattach_t)); if (retval) { @@ -194,7 +195,7 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd, case UIOCAUNBLOCK: /* XXX make `async' */ case UIOCUNBLOCK: { /* Wake up all process waiting on this semaphore */ - us_attach *attach = (us_attach *)arg; + usattach_t *attach = (usattach_t *)arg; int semanum; retval = verify_area(VERIFY_READ, attach, sizeof(usattach_t)); if (retval) { @@ -209,10 +210,11 @@ sgi_usema_ioctl(struct inode *inode, struct file *file, unsigned int cmd, wake_up(&usema_list[semanum].proc_list); return 0; } + } return -ENOSYS; } -static int +static unsigned int sgi_usema_poll(struct file *filp, poll_table *wait) { int semanum = MINOR(filp->f_dentry->d_inode->i_rdev); -- cgit v1.2.3