sbin/hammer: Make show print symlink[24] if inode is symlink
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 11 Dec 2015 09:57:03 +0000 (18:57 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 11 Dec 2015 10:02:51 +0000 (19:02 +0900)
Since now that parent_obj_localization part of the union
inode.ext is gone. It's either a symlink string or not used.

sbin/hammer/cmd_show.c

index bcd083c..78e5440 100644 (file)
@@ -673,10 +673,15 @@ print_record(hammer_btree_elm_t elm)
                                data->inode.mode,
                                data->inode.uflags);
                        printf("%17s", "");
-                       printf("ctime=%016jx pobjid=%016jx ot=%02x\n",
+                       printf("ctime=%016jx pobjid=%016jx ot=%02x",
                                (uintmax_t)data->inode.ctime,
                                (uintmax_t)data->inode.parent_obj_id,
                                data->inode.obj_type);
+                       if (data->inode.ext.symlink[0])
+                               printf(" symlink=\"%s\"\n",
+                                       data->inode.ext.symlink);
+                       else
+                               printf("\n");
                        printf("%17s", "");
                        printf("mtime=%016jx caps=%02x",
                                (uintmax_t)data->inode.mtime,