Skip to content

Commit

Permalink
vt: Fix use of "new" in a struct field
Browse files Browse the repository at this point in the history
As this struct is exposed to user space and the API was added for this
release it's a bit of a pain for the C++ world and we still have time to
fix it. Rename the fields before we end up with that pain in an actual
release.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reported-by: Olivier Goffart
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and torvalds committed Nov 19, 2009
1 parent 5854d9c commit 308efab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/char/vt_ioctl.c
Expand Up @@ -103,8 +103,8 @@ void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
ve->event.event = event;
/* kernel view is consoles 0..n-1, user space view is
console 1..n with 0 meaning current, so we must bias */
ve->event.old = old + 1;
ve->event.new = new + 1;
ve->event.oldev = old + 1;
ve->event.newev = new + 1;
wake = 1;
ve->done = 1;
}
Expand Down Expand Up @@ -186,7 +186,7 @@ int vt_waitactive(int n)
vt_event_wait(&vw);
if (vw.done == 0)
return -EINTR;
} while (vw.event.new != n);
} while (vw.event.newev != n);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions include/linux/vt.h
Expand Up @@ -70,8 +70,8 @@ struct vt_event {
#define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */
#define VT_EVENT_RESIZE 0x0008 /* Resize display */
#define VT_MAX_EVENT 0x000F
unsigned int old; /* Old console */
unsigned int new; /* New console (if changing) */
unsigned int oldev; /* Old console */
unsigned int newev; /* New console (if changing) */
unsigned int pad[4]; /* Padding for expansion */
};

Expand Down

0 comments on commit 308efab

Please sign in to comment.