Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern clean trailing whitespace



details:   https://anonhg.NetBSD.org/src/rev/ec473809e1e7
branches:  trunk
changeset: 1007998:ec473809e1e7
user:      tnn <tnn%NetBSD.org@localhost>
date:      Sat Mar 07 23:20:19 2020 +0000

description:
clean trailing whitespace

diffstat:

 sys/kern/subr_tftproot.c |  68 ++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 34 deletions(-)

diffs (230 lines):

diff -r f44e7a65ce12 -r ec473809e1e7 sys/kern/subr_tftproot.c
--- a/sys/kern/subr_tftproot.c  Sat Mar 07 23:17:47 2020 +0000
+++ b/sys/kern/subr_tftproot.c  Sat Mar 07 23:20:19 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_tftproot.c,v 1.23 2019/01/20 21:26:13 bad Exp $ */
+/*     $NetBSD: subr_tftproot.c,v 1.24 2020/03/07 23:20:19 tnn Exp $ */
 
 /*-
  * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved.
@@ -14,14 +14,14 @@
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
  *     This product includes software developed by Emmanuel Dreyfus
- * 4. The name of the author may not be used to endorse or promote 
- *    products derived from this software without specific prior written 
+ * 4. The name of the author may not be used to endorse or promote
+ *    products derived from this software without specific prior written
  *    permission.
  *
- * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS'' 
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+ * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -39,7 +39,7 @@
 #include "opt_md.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.23 2019/01/20 21:26:13 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.24 2020/03/07 23:20:19 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -65,8 +65,8 @@
 #include <nfs/nfsdiskless.h>
 #include <nfs/nfs_var.h>
 
-/* 
- * Copied from <lib/libsa/tftp.h> 
+/*
+ * Copied from <lib/libsa/tftp.h>
  */
 
 #define SEGSIZE         512             /* data segment size */
@@ -134,7 +134,7 @@
                        if (strcmp(rootspec, ifp->if_xname) == 0)
                                break;
                pserialize_read_exit(s);
-       } 
+       }
 
        if ((ifp == NULL) &&
            (bootdv != NULL && device_class(bootdv) == DV_IFNET)) {
@@ -167,12 +167,12 @@
        nd->nd_nomount = 1;
 
        if ((error = nfs_boot_init(nd, l)) != 0) {
-               DPRINTF(("%s():%d nfs_boot_init returned %d\n", 
+               DPRINTF(("%s():%d nfs_boot_init returned %d\n",
                    __func__, __LINE__, error));
                goto out;
        }
 
-       /* 
+       /*
         * Strip leading "tftp:"
         */
 #define PREFIX "tftp:"
@@ -189,7 +189,7 @@
        trh.trh_block = 1;
 
        if ((error = tftproot_getfile(&trh, l)) != 0) {
-               DPRINTF(("%s():%d tftproot_getfile returned %d\n", 
+               DPRINTF(("%s():%d tftproot_getfile returned %d\n",
                    __func__, __LINE__, error));
                goto out;
        }
@@ -203,7 +203,7 @@
        return error;
 }
 
-static int 
+static int
 tftproot_getfile(struct tftproot_handle *trh, struct lwp *l)
 {
        struct socket *so = NULL;
@@ -218,7 +218,7 @@
        char *cp;
        
        if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, l, NULL)) != 0) {
-               DPRINTF(("%s():%d socreate returned %d\n", 
+               DPRINTF(("%s():%d socreate returned %d\n",
                    __func__, __LINE__, error));
                goto out;
        }
@@ -227,7 +227,7 @@
         * Set timeout
         */
        if ((error = nfs_boot_setrecvtimo(so))) {
-               DPRINTF(("%s():%d SO_RCVTIMEO failed %d\n", 
+               DPRINTF(("%s():%d SO_RCVTIMEO failed %d\n",
                    __func__, __LINE__, error));
                goto out;
        }
@@ -244,7 +244,7 @@
        namelen = strlen(trh->trh_nd->nd_bootfile) + 1;
        packetlen = sizeof(tftp->th_opcode) + namelen + sizeof(octetstr);
        if (packetlen > MSIZE) {
-               DPRINTF(("%s():%d boot filename too long (%ld bytes)\n", 
+               DPRINTF(("%s():%d boot filename too long (%ld bytes)\n",
                    __func__, __LINE__, (long)namelen));
                error = E2BIG;
                goto out;
@@ -265,10 +265,10 @@
        cp += namelen;
        (void)strncpy(cp, octetstr, sizeof(octetstr));
 
-       /* 
+       /*
         * Perform the file transfer
         */
-       printf("tftproot: download %s:%s ", 
+       printf("tftproot: download %s:%s ",
            inet_ntoa(sin.sin_addr), trh->trh_nd->nd_bootfile);
 
        do {
@@ -281,19 +281,19 @@
                if ((trh->trh_block % TFTPROOT_PROGRESS) == 0)
                        twiddle();
 
-               /* 
-                * Send the packet and receive the answer. 
+               /*
+                * Send the packet and receive the answer.
                 * We get the sender address here, which should be
                 * the same server with a different port
                 */
                if ((error = nfs_boot_sendrecv(so, &sin, NULL, m_outbuf,
                    tftproot_recv, NULL, &m_serv, trh, l)) != 0) {
-                       DPRINTF(("%s():%d sendrecv failed %d\n", 
+                       DPRINTF(("%s():%d sendrecv failed %d\n",
                            __func__, __LINE__, error));
                        goto out;
                }
 
-               /* 
+               /*
                 * Accommodate the packet length for acks.
                 * This is really needed only on first pass
                 */
@@ -320,17 +320,17 @@
         */
        if ((error = (*so->so_send)(so, mtod(m_serv, struct sockaddr *), NULL,
            m_outbuf, NULL, 0, l)) != 0) {
-               DPRINTF(("%s():%d tftproot: sosend returned %d\n", 
+               DPRINTF(("%s():%d tftproot: sosend returned %d\n",
                    __func__, __LINE__, error));
        }
 
        /* Freed by the protocol */
        m_outbuf = NULL;
 
-       /* 
-        * And use it as the root ramdisk. 
+       /*
+        * And use it as the root ramdisk.
         */
-       DPRINTF(("%s():%d RAMdisk loaded: %ld@%p\n", 
+       DPRINTF(("%s():%d RAMdisk loaded: %ld@%p\n",
            __func__, __LINE__, trh->trh_len, trh->trh_base));
        md_root_setconf(trh->trh_base, trh->trh_len);
 
@@ -361,7 +361,7 @@
         * Check for short packet
         */
        if (m->m_pkthdr.len < hdrlen) {
-               DPRINTF(("%s():%d short reply (%d bytes)\n", 
+               DPRINTF(("%s():%d short reply (%d bytes)\n",
                    __func__, __LINE__, m->m_pkthdr.len));
                return -1;
        }
@@ -370,7 +370,7 @@
         * Check for packet too large for being a TFTP packet
         */
        if (m->m_pkthdr.len > hdrlen + SEGSIZE) {
-               DPRINTF(("%s():%d packet too big (%d bytes)\n", 
+               DPRINTF(("%s():%d packet too big (%d bytes)\n",
                    __func__, __LINE__, m->m_pkthdr.len));
                return -1;
        }
@@ -417,7 +417,7 @@
        }
 
        default:
-               DPRINTF(("%s():%d unexpected tftp reply opcode %d\n", 
+               DPRINTF(("%s():%d unexpected tftp reply opcode %d\n",
                    __func__, __LINE__, ntohs(tftp->th_opcode)));
                return -1;
                break;
@@ -427,7 +427,7 @@
         * Check for last packet, which does not fill the whole space
         */
        if (m->m_pkthdr.len < hdrlen + SEGSIZE) {
-               DPRINTF(("%s():%d last chunk (%d bytes)\n", 
+               DPRINTF(("%s():%d last chunk (%d bytes)\n",
                    __func__, __LINE__, m->m_pkthdr.len));
                trh->trh_flags |= TRH_FINISHED;
        }
@@ -439,13 +439,13 @@
                return -1;
        }
 
-       /* 
+       /*
         * Grow the receiving buffer to accommodate new data
         */
        newlen = trh->trh_len + (m->m_pkthdr.len - hdrlen);
-       if ((trh->trh_base = realloc(trh->trh_base, 
+       if ((trh->trh_base = realloc(trh->trh_base,
            newlen, M_TEMP, M_WAITOK)) == NULL) {
-               DPRINTF(("%s():%d failed to realloc %ld bytes\n", 
+               DPRINTF(("%s():%d failed to realloc %ld bytes\n",
                    __func__, __LINE__, (long)newlen));
                return -1;
        }



Home | Main Index | Thread Index | Old Index