The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=065cbc77076ec8d38385406deefa8331bc2432f5

commit 065cbc77076ec8d38385406deefa8331bc2432f5
Author:     Warner Losh <[email protected]>
AuthorDate: 2022-07-28 04:07:52 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2022-07-28 04:29:27 +0000

    kboot: Do a style(9) pass on kbootfdt.c
    
    Mostly just properly indent.
    
    Sponsored by:           Netflix
---
 stand/kboot/kbootfdt.c | 68 +++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/stand/kboot/kbootfdt.c b/stand/kboot/kbootfdt.c
index 14bc94326fe6..5e0ef9ea3068 100644
--- a/stand/kboot/kbootfdt.c
+++ b/stand/kboot/kbootfdt.c
@@ -53,44 +53,44 @@ add_node_to_fdt(void *buffer, const char *path, int 
fdt_offset)
 
        fd = host_open(path, O_RDONLY, 0);
        while (1) {
-           dentsize = host_getdents(fd, dents, sizeof(dents));
-           if (dentsize <= 0)
-             break;
-           for (dent = (struct host_dent *)dents;
-             (char *)dent < dents + dentsize;
-             dent = (struct host_dent *)((void *)dent + dent->d_reclen)) {
-               sprintf(subpath, "%s/%s", path, dent->d_name);
-               if (strcmp(dent->d_name, ".") == 0 ||
-                   strcmp(dent->d_name, "..") == 0)
-                       continue;
-               d_type = *((char *)(dent) + dent->d_reclen - 1);
-               if (d_type == 4 /* DT_DIR */) {
-                       child_offset = fdt_add_subnode(buffer, fdt_offset,
-                           dent->d_name);
-                       if (child_offset < 0) {
-                               printf("Error %d adding node %s/%s, skipping\n",
-                                   child_offset, path, dent->d_name);
+               dentsize = host_getdents(fd, dents, sizeof(dents));
+               if (dentsize <= 0)
+                       break;
+               for (dent = (struct host_dent *)dents;
+                    (char *)dent < dents + dentsize;
+                    dent = (struct host_dent *)((void *)dent + 
dent->d_reclen)) {
+                       sprintf(subpath, "%s/%s", path, dent->d_name);
+                       if (strcmp(dent->d_name, ".") == 0 ||
+                           strcmp(dent->d_name, "..") == 0)
                                continue;
-                       }
+                       d_type = *((char *)(dent) + dent->d_reclen - 1);
+                       if (d_type == 4 /* DT_DIR */) {
+                               child_offset = fdt_add_subnode(buffer, 
fdt_offset,
+                                   dent->d_name);
+                               if (child_offset < 0) {
+                                       printf("Error %d adding node %s/%s, 
skipping\n",
+                                           child_offset, path, dent->d_name);
+                                       continue;
+                               }
                
-                       add_node_to_fdt(buffer, subpath, child_offset);
-               } else {
-                       propbuf = malloc(1024);
-                       proplen = 0;
-                       pfd = host_open(subpath, O_RDONLY, 0);
-                       if (pfd > 0) {
-                               proplen = host_read(pfd, propbuf, 1024);
-                               host_close(pfd);
+                               add_node_to_fdt(buffer, subpath, child_offset);
+                       } else {
+                               propbuf = malloc(1024);
+                               proplen = 0;
+                               pfd = host_open(subpath, O_RDONLY, 0);
+                               if (pfd > 0) {
+                                       proplen = host_read(pfd, propbuf, 1024);
+                                       host_close(pfd);
+                               }
+                               error = fdt_setprop(buffer, fdt_offset, 
dent->d_name,
+                                   propbuf, proplen);
+                               free(propbuf);
+                               if (error)
+                                       printf("Error %d adding property %s to "
+                                           "node %d\n", error, dent->d_name,
+                                           fdt_offset);
                        }
-                       error = fdt_setprop(buffer, fdt_offset, dent->d_name,
-                           propbuf, proplen);
-                       free(propbuf);
-                       if (error)
-                               printf("Error %d adding property %s to "
-                                   "node %d\n", error, dent->d_name,
-                                   fdt_offset);
                }
-           }
        }
 
        host_close(fd);

Reply via email to