[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 08/15] mini-os: eliminate fbfront union member in struct file
Juergen Gross, le jeu. 06 janv. 2022 12:57:34 +0100, a ecrit: > Replace the fbfront specific union member in struct file with the > common dev pointer. > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> > --- > fbfront.c | 2 +- > include/lib.h | 3 --- > lib/sys.c | 4 ++-- > 3 files changed, 3 insertions(+), 6 deletions(-) > > diff --git a/fbfront.c b/fbfront.c > index 6725da1..c8410af 100644 > --- a/fbfront.c > +++ b/fbfront.c > @@ -703,7 +703,7 @@ int fbfront_open(struct fbfront_dev *dev) > { > dev->fd = alloc_fd(FTYPE_FB); > printk("fb_open(%s) -> %d\n", dev->nodename, dev->fd); > - files[dev->fd].fb.dev = dev; > + files[dev->fd].dev = dev; > return dev->fd; > } > #endif > diff --git a/include/lib.h b/include/lib.h > index 0cedae6..2a9a01c 100644 > --- a/include/lib.h > +++ b/include/lib.h > @@ -199,9 +199,6 @@ struct file { > struct { > struct kbdfront_dev *dev; > } kbd; > - struct { > - struct fbfront_dev *dev; > - } fb; > #ifdef CONFIG_TPMFRONT > struct { > struct tpmfront_dev *dev; > diff --git a/lib/sys.c b/lib/sys.c > index 62c2020..2d48657 100644 > --- a/lib/sys.c > +++ b/lib/sys.c > @@ -287,7 +287,7 @@ int read(int fd, void *buf, size_t nbytes) > case FTYPE_FB: { > int ret, n; > n = nbytes / sizeof(union xenfb_in_event); > - ret = fbfront_receive(files[fd].fb.dev, buf, n); > + ret = fbfront_receive(files[fd].dev, buf, n); > if (ret <= 0) { > errno = EAGAIN; > return -1; > @@ -480,7 +480,7 @@ int close(int fd) > #endif > #ifdef CONFIG_FBFRONT > case FTYPE_FB: > - shutdown_fbfront(files[fd].fb.dev); > + shutdown_fbfront(files[fd].dev); > files[fd].type = FTYPE_NONE; > return 0; > #endif > -- > 2.26.2 > -- Samuel La fonction memfrob() crypte les n premiers octets de la zone de mémoire s en effectuant un OU-exclusif entre chaque octet et le nombre 42. (extrait de la page de man de memfrob -- Manuel du programmeur Linux)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |