Module Name: src Committed By: maxv Date: Thu May 7 19:25:57 UTC 2020
Modified Files: src/sys/arch/xen/xen: xbd_xenbus.c xencons.c Log Message: Localify. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/arch/xen/xen/xbd_xenbus.c cvs rdiff -u -r1.49 -r1.50 src/sys/arch/xen/xen/xencons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/xen/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.124 src/sys/arch/xen/xen/xbd_xenbus.c:1.125 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.124 Sun May 3 17:54:28 2020 +++ src/sys/arch/xen/xen/xbd_xenbus.c Thu May 7 19:25:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.124 2020/05/03 17:54:28 jdolecek Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.125 2020/05/07 19:25:57 maxv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -50,7 +50,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.124 2020/05/03 17:54:28 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.125 2020/05/07 19:25:57 maxv Exp $"); #include "opt_xen.h" @@ -214,14 +214,14 @@ CFATTACH_DECL3_NEW(xbd, sizeof(struct xb xbd_xenbus_match, xbd_xenbus_attach, xbd_xenbus_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); -dev_type_open(xbdopen); -dev_type_close(xbdclose); -dev_type_read(xbdread); -dev_type_write(xbdwrite); -dev_type_ioctl(xbdioctl); -dev_type_strategy(xbdstrategy); -dev_type_dump(xbddump); -dev_type_size(xbdsize); +static dev_type_open(xbdopen); +static dev_type_close(xbdclose); +static dev_type_read(xbdread); +static dev_type_write(xbdwrite); +static dev_type_ioctl(xbdioctl); +static dev_type_strategy(xbdstrategy); +static dev_type_dump(xbddump); +static dev_type_size(xbdsize); const struct bdevsw xbd_bdevsw = { .d_open = xbdopen, @@ -924,7 +924,7 @@ xbd_iosize(device_t dev, int *maxxfer) *maxxfer = XBD_MAX_XFER; } -int +static int xbdopen(dev_t dev, int flags, int fmt, struct lwp *l) { struct xbd_xenbus_softc *sc; @@ -939,7 +939,7 @@ xbdopen(dev_t dev, int flags, int fmt, s return dk_open(&sc->sc_dksc, dev, flags, fmt, l); } -int +static int xbdclose(dev_t dev, int flags, int fmt, struct lwp *l) { struct xbd_xenbus_softc *sc; @@ -950,7 +950,7 @@ xbdclose(dev_t dev, int flags, int fmt, return dk_close(&sc->sc_dksc, dev, flags, fmt, l); } -void +static void xbdstrategy(struct buf *bp) { struct xbd_xenbus_softc *sc; @@ -976,7 +976,7 @@ xbdstrategy(struct buf *bp) return; } -int +static int xbdsize(dev_t dev) { struct xbd_xenbus_softc *sc; @@ -989,7 +989,7 @@ xbdsize(dev_t dev) return dk_size(&sc->sc_dksc, dev); } -int +static int xbdread(dev_t dev, struct uio *uio, int flags) { struct xbd_xenbus_softc *sc = @@ -1001,7 +1001,7 @@ xbdread(dev_t dev, struct uio *uio, int return physio(xbdstrategy, NULL, dev, B_READ, xbdminphys, uio); } -int +static int xbdwrite(dev_t dev, struct uio *uio, int flags) { struct xbd_xenbus_softc *sc = @@ -1015,7 +1015,7 @@ xbdwrite(dev_t dev, struct uio *uio, int return physio(xbdstrategy, NULL, dev, B_WRITE, xbdminphys, uio); } -int +static int xbdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct xbd_xenbus_softc *sc = @@ -1087,7 +1087,7 @@ xbdioctl(dev_t dev, u_long cmd, void *da return error; } -int +static int xbddump(dev_t dev, daddr_t blkno, void *va, size_t size) { struct xbd_xenbus_softc *sc; Index: src/sys/arch/xen/xen/xencons.c diff -u src/sys/arch/xen/xen/xencons.c:1.49 src/sys/arch/xen/xen/xencons.c:1.50 --- src/sys/arch/xen/xen/xencons.c:1.49 Sat Apr 25 15:26:18 2020 +++ src/sys/arch/xen/xen/xencons.c Thu May 7 19:25:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xencons.c,v 1.49 2020/04/25 15:26:18 bouyer Exp $ */ +/* $NetBSD: xencons.c,v 1.50 2020/05/07 19:25:57 maxv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -53,7 +53,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.49 2020/04/25 15:26:18 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xencons.c,v 1.50 2020/05/07 19:25:57 maxv Exp $"); #include "opt_xen.h" @@ -96,11 +96,10 @@ static struct intrhand *ih; #define XENCONS_UNIT(x) (minor(x)) #define XENCONS_BURST 128 -int xencons_match(device_t, cfdata_t, void *); -void xencons_attach(device_t, device_t, void *); -int xencons_intr(void *); -void xencons_tty_input(struct xencons_softc *, char*, int); - +static int xencons_match(device_t, cfdata_t, void *); +static void xencons_attach(device_t, device_t, void *); +static int xencons_intr(void *); +static void xencons_tty_input(struct xencons_softc *, char*, int); struct xencons_softc { device_t sc_dev; @@ -114,14 +113,14 @@ CFATTACH_DECL_NEW(xencons, sizeof(struct extern struct cfdriver xencons_cd; -dev_type_open(xencons_open); -dev_type_close(xencons_close); -dev_type_read(xencons_read); -dev_type_write(xencons_write); -dev_type_ioctl(xencons_ioctl); -dev_type_stop(xencons_stop); -dev_type_tty(xencons_tty); -dev_type_poll(xencons_poll); +static dev_type_open(xencons_open); +static dev_type_close(xencons_close); +static dev_type_read(xencons_read); +static dev_type_write(xencons_write); +static dev_type_ioctl(xencons_ioctl); +static dev_type_stop(xencons_stop); +static dev_type_tty(xencons_tty); +static dev_type_poll(xencons_poll); const struct cdevsw xencons_cdevsw = { .d_open = xencons_open, @@ -138,11 +137,10 @@ const struct cdevsw xencons_cdevsw = { .d_flag = D_TTY }; - static int xencons_handler(void *); -int xenconscn_getc(dev_t); -void xenconscn_putc(dev_t, int); -void xenconscn_pollc(dev_t, int); +static int xenconscn_getc(dev_t); +static void xenconscn_putc(dev_t, int); +static void xenconscn_pollc(dev_t, int); static bool xencons_suspend(device_t, const pmf_qual_t *); static bool xencons_resume(device_t, const pmf_qual_t *); @@ -154,10 +152,10 @@ static struct consdev xencons = { static struct cnm_state xencons_cnm_state; -void xencons_start (struct tty *); -int xencons_param (struct tty *, struct termios *); +static void xencons_start(struct tty *); +static int xencons_param(struct tty *, struct termios *); -int +static int xencons_match(device_t parent, cfdata_t match, void *aux) { struct xencons_attach_args *xa = (struct xencons_attach_args *)aux; @@ -167,7 +165,7 @@ xencons_match(device_t parent, cfdata_t return 0; } -void +static void xencons_attach(device_t parent, device_t self, void *aux) { struct xencons_softc *sc = device_private(self); @@ -256,7 +254,7 @@ xencons_resume(device_t dev, const pmf_q return true; } -int +static int xencons_open(dev_t dev, int flag, int mode, struct lwp *l) { struct xencons_softc *sc; @@ -287,7 +285,7 @@ xencons_open(dev_t dev, int flag, int mo return ((*tp->t_linesw->l_open)(dev, tp)); } -int +static int xencons_close(dev_t dev, int flag, int mode, struct lwp *l) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -304,7 +302,7 @@ xencons_close(dev_t dev, int flag, int m return (0); } -int +static int xencons_read(dev_t dev, struct uio *uio, int flag) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -314,7 +312,7 @@ xencons_read(dev_t dev, struct uio *uio, return ((*tp->t_linesw->l_read)(tp, uio, flag)); } -int +static int xencons_write(dev_t dev, struct uio *uio, int flag) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -324,7 +322,7 @@ xencons_write(dev_t dev, struct uio *uio return ((*tp->t_linesw->l_write)(tp, uio, flag)); } -int +static int xencons_poll(dev_t dev, int events, struct lwp *l) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -334,7 +332,7 @@ xencons_poll(dev_t dev, int events, stru return ((*tp->t_linesw->l_poll)(tp, events, l)); } -struct tty * +static struct tty * xencons_tty(dev_t dev) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -344,7 +342,7 @@ xencons_tty(dev_t dev) return (tp); } -int +static int xencons_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct xencons_softc *sc = device_lookup_private(&xencons_cd, @@ -370,7 +368,7 @@ xencons_ioctl(dev_t dev, u_long cmd, voi #endif } -void +static void xencons_start(struct tty *tp) { struct clist *cl; @@ -437,13 +435,12 @@ out: splx(s); } -void +static void xencons_stop(struct tty *tp, int flag) { } - /* Non-privileged console interrupt routine */ static int xencons_handler(void *arg) @@ -491,8 +488,7 @@ xencons_handler(void *arg) #undef XNC_IN } - -void +static void xencons_tty_input(struct xencons_softc *sc, char* buf, int len) { struct tty *tp; @@ -509,7 +505,7 @@ xencons_tty_input(struct xencons_softc * } /* privileged receive callback */ -int +static int xencons_intr(void *p) { static char rbuf[16]; @@ -544,7 +540,7 @@ xenconscn_attach(void) xencons_isconsole = 1; } -int +static int xenconscn_getc(dev_t dev) { char c; @@ -594,7 +590,7 @@ xenconscn_getc(dev_t dev) return c; } -void +static void xenconscn_putc(dev_t dev, int c) { int s = spltty(); @@ -626,7 +622,7 @@ xenconscn_putc(dev_t dev, int c) } } -void +static void xenconscn_pollc(dev_t dev, int on) { if (xencons_console_device) @@ -636,7 +632,7 @@ xenconscn_pollc(dev_t dev, int on) /* * Set line parameters. */ -int +static int xencons_param(struct tty *tp, struct termios *t) {