Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vt: Fix use of "new" in a struct field

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>

authored by

Alan Cox and committed by
Linus Torvalds
308efab5 5854d9c8

+5 -5
+3 -3
drivers/char/vt_ioctl.c
··· 103 103 ve->event.event = event; 104 104 /* kernel view is consoles 0..n-1, user space view is 105 105 console 1..n with 0 meaning current, so we must bias */ 106 - ve->event.old = old + 1; 107 - ve->event.new = new + 1; 106 + ve->event.oldev = old + 1; 107 + ve->event.newev = new + 1; 108 108 wake = 1; 109 109 ve->done = 1; 110 110 } ··· 186 186 vt_event_wait(&vw); 187 187 if (vw.done == 0) 188 188 return -EINTR; 189 - } while (vw.event.new != n); 189 + } while (vw.event.newev != n); 190 190 return 0; 191 191 } 192 192
+2 -2
include/linux/vt.h
··· 70 70 #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ 71 71 #define VT_EVENT_RESIZE 0x0008 /* Resize display */ 72 72 #define VT_MAX_EVENT 0x000F 73 - unsigned int old; /* Old console */ 74 - unsigned int new; /* New console (if changing) */ 73 + unsigned int oldev; /* Old console */ 74 + unsigned int newev; /* New console (if changing) */ 75 75 unsigned int pad[4]; /* Padding for expansion */ 76 76 }; 77 77