snoop_nfs4.c (3608:ea12a5a705a7) | snoop_nfs4.c (11291:80bdcd03e626) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* |
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. | 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 | 23 * Use is subject to license terms. 24 */ 25 |
26#pragma ident "%Z%%M% %I% %E% SMI" 27 28 | |
29#include <ctype.h> 30#include <string.h> 31#include <strings.h> 32#include <stdlib.h> 33#include <sys/types.h> 34#include <sys/errno.h> 35#include <sys/tiuser.h> 36#include <setjmp.h> --- 536 unchanged lines hidden (view full) --- 573static char *detail_type_name(nfs_ftype4); 574static char *createhow4_name(createhow4 *crtp); 575 576 577static void showxdr_utf8string(char *); 578static char *utf8localize(utf8string *); 579static void utf8free(void); 580static void sum_pathname4(char *, size_t, pathname4 *); | 26#include <ctype.h> 27#include <string.h> 28#include <strings.h> 29#include <stdlib.h> 30#include <sys/types.h> 31#include <sys/errno.h> 32#include <sys/tiuser.h> 33#include <setjmp.h> --- 536 unchanged lines hidden (view full) --- 570static char *detail_type_name(nfs_ftype4); 571static char *createhow4_name(createhow4 *crtp); 572 573 574static void showxdr_utf8string(char *); 575static char *utf8localize(utf8string *); 576static void utf8free(void); 577static void sum_pathname4(char *, size_t, pathname4 *); |
581static void detail_pathname4(pathname4 *pathp); | 578static void detail_pathname4(pathname4 *pathp, char *); |
582static void sum_compname4(char *buf, size_t buflen, component4 *comp); 583static void detail_compname4(component4 *comp); 584 585static void detail_fattr4(fattr4 *attrp); 586static void detail_attr_bitmap(char *, bitmap4 *, unpkd_attrmap_t *); 587static void sum_attr_bitmap(char *buf, size_t buflen, bitmap4 *mapp); 588static void detail_fattr4_change(char *msg, fattr4_change chg); 589static char *sum_fh4(nfs_fh4 *fhp); --- 101 unchanged lines hidden (view full) --- 691 if (proc < 0 || proc > MAXPROC) 692 return; 693 694 if (flags & F_SUM) { 695 line = get_sum_line(); 696 697 if (type == CALL) { 698 (void) sprintf(line, "NFS C %s", | 579static void sum_compname4(char *buf, size_t buflen, component4 *comp); 580static void detail_compname4(component4 *comp); 581 582static void detail_fattr4(fattr4 *attrp); 583static void detail_attr_bitmap(char *, bitmap4 *, unpkd_attrmap_t *); 584static void sum_attr_bitmap(char *buf, size_t buflen, bitmap4 *mapp); 585static void detail_fattr4_change(char *msg, fattr4_change chg); 586static char *sum_fh4(nfs_fh4 *fhp); --- 101 unchanged lines hidden (view full) --- 688 if (proc < 0 || proc > MAXPROC) 689 return; 690 691 if (flags & F_SUM) { 692 line = get_sum_line(); 693 694 if (type == CALL) { 695 (void) sprintf(line, "NFS C %s", |
699 proc == CB_COMPOUND ? "CB4" : 700 cb_procnames_short[proc]); | 696 proc == CB_COMPOUND ? "CB4" : 697 cb_procnames_short[proc]); |
701 line += strlen(line); 702 703 if (proc == CB_COMPOUND) { 704 static utf8string tag; 705 706 if (!xdr_utf8string(&xdrm, &tag)) 707 longjmp(xdr_err, 1); 708 sprintf(line, " (%.20s) %s", | 698 line += strlen(line); 699 700 if (proc == CB_COMPOUND) { 701 static utf8string tag; 702 703 if (!xdr_utf8string(&xdrm, &tag)) 704 longjmp(xdr_err, 1); 705 sprintf(line, " (%.20s) %s", |
709 utf8localize(&tag), 710 sum_cb_compound4args()); | 706 utf8localize(&tag), 707 sum_cb_compound4args()); |
711 xdr_free(xdr_utf8string, (char *)&tag); 712 } 713 check_retransmit(line, xid); 714 } else { 715 (void) sprintf(line, "NFS R %s ", | 708 xdr_free(xdr_utf8string, (char *)&tag); 709 } 710 check_retransmit(line, xid); 711 } else { 712 (void) sprintf(line, "NFS R %s ", |
716 proc == CB_COMPOUND ? "CB4" : 717 cb_procnames_short[proc]); | 713 proc == CB_COMPOUND ? "CB4" : 714 cb_procnames_short[proc]); |
718 line += strlen(line); 719 if (proc == CB_COMPOUND) 720 sum_comp4res(line, sum_cb_compound4res); 721 } 722 } 723 724 if (flags & F_DTAIL) { 725 show_header("NFS: ", "Sun NFS4 CallBack", len); 726 show_space(); 727 (void) sprintf(get_line(0, 0), "Proc = %d (%s)", | 715 line += strlen(line); 716 if (proc == CB_COMPOUND) 717 sum_comp4res(line, sum_cb_compound4res); 718 } 719 } 720 721 if (flags & F_DTAIL) { 722 show_header("NFS: ", "Sun NFS4 CallBack", len); 723 show_space(); 724 (void) sprintf(get_line(0, 0), "Proc = %d (%s)", |
728 proc, cb_procnames_long[proc]); | 725 proc, cb_procnames_long[proc]); |
729 if (proc == CB_COMPOUND) { 730 if (type == CALL) { 731 showxdr_utf8string("Tag = %s"); 732 detail_cb_argop4(); 733 } else { 734 nfsstat4 status; 735 736 status = getxdr_long(); 737 showxdr_utf8string("Tag = %s"); 738 sprintf(get_line(0, 0), "Status = %d (%s)", | 726 if (proc == CB_COMPOUND) { 727 if (type == CALL) { 728 showxdr_utf8string("Tag = %s"); 729 detail_cb_argop4(); 730 } else { 731 nfsstat4 status; 732 733 status = getxdr_long(); 734 showxdr_utf8string("Tag = %s"); 735 sprintf(get_line(0, 0), "Status = %d (%s)", |
739 status, status_name(status)); | 736 status, status_name(status)); |
740 detail_cb_resop4(); 741 } 742 } 743 show_trailer(); 744 } 745 746 utf8free(); /* cf. utf8localize() */ 747} --- 13 unchanged lines hidden (view full) --- 761 nfs4_pkt_len = len; 762 nfs4_pkt_start = xdr_getpos(&xdrm); 763 764 if (flags & F_SUM) { 765 line = get_sum_line(); 766 767 if (type == CALL) { 768 (void) sprintf(line, "NFS C %s", | 737 detail_cb_resop4(); 738 } 739 } 740 show_trailer(); 741 } 742 743 utf8free(); /* cf. utf8localize() */ 744} --- 13 unchanged lines hidden (view full) --- 758 nfs4_pkt_len = len; 759 nfs4_pkt_start = xdr_getpos(&xdrm); 760 761 if (flags & F_SUM) { 762 line = get_sum_line(); 763 764 if (type == CALL) { 765 (void) sprintf(line, "NFS C %s", |
769 proc == NFSPROC4_COMPOUND ? "4" : 770 procnames_short[proc]); | 766 proc == NFSPROC4_COMPOUND ? "4" : 767 procnames_short[proc]); |
771 line += strlen(line); 772 773 if (proc == NFSPROC4_COMPOUND) { 774 static utf8string tag; 775 776 if (!xdr_utf8string(&xdrm, &tag)) 777 longjmp(xdr_err, 1); 778 sprintf(line, " (%.20s) %s", | 768 line += strlen(line); 769 770 if (proc == NFSPROC4_COMPOUND) { 771 static utf8string tag; 772 773 if (!xdr_utf8string(&xdrm, &tag)) 774 longjmp(xdr_err, 1); 775 sprintf(line, " (%.20s) %s", |
779 utf8localize(&tag), 780 sum_compound4args()); | 776 utf8localize(&tag), 777 sum_compound4args()); |
781 xdr_free(xdr_utf8string, (char *)&tag); 782 } 783 check_retransmit(line, xid); 784 } else { 785 (void) sprintf(line, "NFS R %s ", | 778 xdr_free(xdr_utf8string, (char *)&tag); 779 } 780 check_retransmit(line, xid); 781 } else { 782 (void) sprintf(line, "NFS R %s ", |
786 proc == NFSPROC4_COMPOUND ? "4" : 787 procnames_short[proc]); | 783 proc == NFSPROC4_COMPOUND ? "4" : 784 procnames_short[proc]); |
788 line += strlen(line); 789 790 if (proc == NFSPROC4_COMPOUND) 791 sum_comp4res(line, sum_compound4res); 792 } 793 } 794 795 if (flags & F_DTAIL) { 796 show_header("NFS: ", "Sun NFS", len); 797 show_space(); 798 (void) sprintf(get_line(0, 0), "Proc = %d (%s)", | 785 line += strlen(line); 786 787 if (proc == NFSPROC4_COMPOUND) 788 sum_comp4res(line, sum_compound4res); 789 } 790 } 791 792 if (flags & F_DTAIL) { 793 show_header("NFS: ", "Sun NFS", len); 794 show_space(); 795 (void) sprintf(get_line(0, 0), "Proc = %d (%s)", |
799 proc, procnames_long[proc]); | 796 proc, procnames_long[proc]); |
800 if (proc == NFSPROC4_COMPOUND) { 801 if (type == CALL) { 802 showxdr_utf8string("Tag = %s"); 803 detail_nfs_argop4(); 804 } else { 805 nfsstat4 status; 806 807 status = getxdr_long(); 808 showxdr_utf8string("Tag = %s"); 809 sprintf(get_line(0, 0), "Status = %d (%s)", | 797 if (proc == NFSPROC4_COMPOUND) { 798 if (type == CALL) { 799 showxdr_utf8string("Tag = %s"); 800 detail_nfs_argop4(); 801 } else { 802 nfsstat4 status; 803 804 status = getxdr_long(); 805 showxdr_utf8string("Tag = %s"); 806 sprintf(get_line(0, 0), "Status = %d (%s)", |
810 status, status_name(status)); | 807 status, status_name(status)); |
811 detail_nfs_resop4(); 812 } 813 } 814 show_trailer(); 815 } 816 817 utf8free(); /* cf. utf8localize() */ 818} --- 16 unchanged lines hidden (view full) --- 835 nfs_argop4 one_op; 836 uint32_t minor_version; 837 838 buf[0] = '\0'; 839 840 if (setjmp(xdr_err)) { 841 bp = buf + strlen(buf); 842 snprintf(bp, buflen - (bp - buf), | 808 detail_nfs_resop4(); 809 } 810 } 811 show_trailer(); 812 } 813 814 utf8free(); /* cf. utf8localize() */ 815} --- 16 unchanged lines hidden (view full) --- 832 nfs_argop4 one_op; 833 uint32_t minor_version; 834 835 buf[0] = '\0'; 836 837 if (setjmp(xdr_err)) { 838 bp = buf + strlen(buf); 839 snprintf(bp, buflen - (bp - buf), |
843 nfs4_fragged_rpc ? nfs4err_fragrpc : nfs4err_xdrfrag); | 840 nfs4_fragged_rpc ? nfs4err_fragrpc : nfs4err_xdrfrag); |
844 return (buf); 845 } 846 847 /* 848 * might be nice to print minor version, but doesn't 849 * seem like very useful info for summary mode 850 */ 851 if (!xdr_uint32_t(&xdrm, &minor_version)) --- 6 unchanged lines hidden (view full) --- 858 859 bzero(&one_op, sizeof (one_op)); 860 861 if (!xdr_nfs_argop4(&xdrm, &one_op)) { 862 xdr_free(xdr_nfs_argop4, (char *)&one_op); 863 longjmp(xdr_err, 1); 864 } 865 snprintf(bp, buflen - (bp - buf), "%s ", | 841 return (buf); 842 } 843 844 /* 845 * might be nice to print minor version, but doesn't 846 * seem like very useful info for summary mode 847 */ 848 if (!xdr_uint32_t(&xdrm, &minor_version)) --- 6 unchanged lines hidden (view full) --- 855 856 bzero(&one_op, sizeof (one_op)); 857 858 if (!xdr_nfs_argop4(&xdrm, &one_op)) { 859 xdr_free(xdr_nfs_argop4, (char *)&one_op); 860 longjmp(xdr_err, 1); 861 } 862 snprintf(bp, buflen - (bp - buf), "%s ", |
866 opcode_name(one_op.argop)); | 863 opcode_name(one_op.argop)); |
867 bp += strlen(bp); 868 869 operand = sum_operand(&one_op); 870 if (strlen(operand) > 0) { 871 snprintf(bp, buflen - (bp - buf), "%s ", operand); 872 bp += strlen(bp); 873 } 874 --- 72 unchanged lines hidden (view full) --- 947 char *bp; 948 nfs_cb_argop4 one_op; 949 uint32_t minor_version, callback_ident; 950 951 buf[0] = '\0'; 952 if (setjmp(xdr_err)) { 953 bp = buf + strlen(buf); 954 snprintf(bp, buflen - (bp - buf), "<XDR Error or Fragmented" | 864 bp += strlen(bp); 865 866 operand = sum_operand(&one_op); 867 if (strlen(operand) > 0) { 868 snprintf(bp, buflen - (bp - buf), "%s ", operand); 869 bp += strlen(bp); 870 } 871 --- 72 unchanged lines hidden (view full) --- 944 char *bp; 945 nfs_cb_argop4 one_op; 946 uint32_t minor_version, callback_ident; 947 948 buf[0] = '\0'; 949 if (setjmp(xdr_err)) { 950 bp = buf + strlen(buf); 951 snprintf(bp, buflen - (bp - buf), "<XDR Error or Fragmented" |
955 " RPC>"); | 952 " RPC>"); |
956 return (buf); 957 } 958 959 /* 960 * might be nice to print minor version, but doesn't 961 * seem like very useful info for summary mode 962 */ 963 if (!xdr_uint32_t(&xdrm, &minor_version)) --- 12 unchanged lines hidden (view full) --- 976 977 bzero(&one_op, sizeof (one_op)); 978 if (!xdr_nfs_cb_argop4(&xdrm, &one_op)) { 979 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 980 longjmp(xdr_err, 1); 981 } 982 983 snprintf(bp, buflen - (bp - buf), "%s ", | 953 return (buf); 954 } 955 956 /* 957 * might be nice to print minor version, but doesn't 958 * seem like very useful info for summary mode 959 */ 960 if (!xdr_uint32_t(&xdrm, &minor_version)) --- 12 unchanged lines hidden (view full) --- 973 974 bzero(&one_op, sizeof (one_op)); 975 if (!xdr_nfs_cb_argop4(&xdrm, &one_op)) { 976 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 977 longjmp(xdr_err, 1); 978 } 979 980 snprintf(bp, buflen - (bp - buf), "%s ", |
984 cb_opcode_name(one_op.argop)); | 981 cb_opcode_name(one_op.argop)); |
985 bp += strlen(bp); 986 operand = sum_cb_operand(&one_op); 987 if (strlen(operand) > 0) { 988 snprintf(bp, buflen - (bp - buf), "%s ", operand); 989 bp += strlen(bp); 990 } 991 992 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); --- 60 unchanged lines hidden (view full) --- 1053 nfs_argop4 one_op; 1054 void (*fmtproc)(void *); 1055 uint32_t minor_version; 1056 1057 if (!xdr_uint32_t(&xdrm, &minor_version)) 1058 longjmp(xdr_err, 1); 1059 1060 (void) sprintf(get_line(0, 0), "Minor version = %u", | 982 bp += strlen(bp); 983 operand = sum_cb_operand(&one_op); 984 if (strlen(operand) > 0) { 985 snprintf(bp, buflen - (bp - buf), "%s ", operand); 986 bp += strlen(bp); 987 } 988 989 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); --- 60 unchanged lines hidden (view full) --- 1050 nfs_argop4 one_op; 1051 void (*fmtproc)(void *); 1052 uint32_t minor_version; 1053 1054 if (!xdr_uint32_t(&xdrm, &minor_version)) 1055 longjmp(xdr_err, 1); 1056 1057 (void) sprintf(get_line(0, 0), "Minor version = %u", |
1061 minor_version); | 1058 minor_version); |
1062 1063 numops = getxdr_long(); 1064 (void) sprintf(get_line(0, 0), "Number of operations = %d", | 1059 1060 numops = getxdr_long(); 1061 (void) sprintf(get_line(0, 0), "Number of operations = %d", |
1065 numops); | 1062 numops); |
1066 1067 while (numops-- > 0) { 1068 bzero(&one_op, sizeof (one_op)); 1069 1070 if (!xdr_nfs_argop4(&xdrm, &one_op)) { 1071 xdr_free(xdr_nfs_argop4, (char *)&one_op); 1072 longjmp(xdr_err, 1); 1073 } 1074 1075 get_line(0, 0); /* blank line to separate ops */ 1076 sprintf(get_line(0, 0), "Op = %d (%s)", | 1063 1064 while (numops-- > 0) { 1065 bzero(&one_op, sizeof (one_op)); 1066 1067 if (!xdr_nfs_argop4(&xdrm, &one_op)) { 1068 xdr_free(xdr_nfs_argop4, (char *)&one_op); 1069 longjmp(xdr_err, 1); 1070 } 1071 1072 get_line(0, 0); /* blank line to separate ops */ 1073 sprintf(get_line(0, 0), "Op = %d (%s)", |
1077 one_op.argop, opcode_name(one_op.argop)); | 1074 one_op.argop, opcode_name(one_op.argop)); |
1078 if (one_op.argop < num_opcodes) { 1079 fmtproc = opcode_info[one_op.argop].dtlarg; 1080 if (fmtproc != NULL) 1081 fmtproc(&one_op.nfs_argop4_u); 1082 } 1083 1084 /* nfs4_skip_bytes set by xdr_nfs_argop4() */ 1085 if (nfs4_skip_bytes) --- 13 unchanged lines hidden (view full) --- 1099 int numops; 1100 nfs_cb_argop4 one_op; 1101 void (*fmtproc)(void *); 1102 uint32_t minor_version, callback_ident; 1103 1104 if (!xdr_uint32_t(&xdrm, &minor_version)) 1105 longjmp(xdr_err, 1); 1106 (void) sprintf(get_line(0, 0), "Minor version = %u", | 1075 if (one_op.argop < num_opcodes) { 1076 fmtproc = opcode_info[one_op.argop].dtlarg; 1077 if (fmtproc != NULL) 1078 fmtproc(&one_op.nfs_argop4_u); 1079 } 1080 1081 /* nfs4_skip_bytes set by xdr_nfs_argop4() */ 1082 if (nfs4_skip_bytes) --- 13 unchanged lines hidden (view full) --- 1096 int numops; 1097 nfs_cb_argop4 one_op; 1098 void (*fmtproc)(void *); 1099 uint32_t minor_version, callback_ident; 1100 1101 if (!xdr_uint32_t(&xdrm, &minor_version)) 1102 longjmp(xdr_err, 1); 1103 (void) sprintf(get_line(0, 0), "Minor version = %u", |
1107 minor_version); | 1104 minor_version); |
1108 1109 if (!xdr_uint32_t(&xdrm, &callback_ident)) 1110 longjmp(xdr_err, 1); 1111 (void) sprintf(get_line(0, 0), "Callback Ident = %u", | 1105 1106 if (!xdr_uint32_t(&xdrm, &callback_ident)) 1107 longjmp(xdr_err, 1); 1108 (void) sprintf(get_line(0, 0), "Callback Ident = %u", |
1112 callback_ident); | 1109 callback_ident); |
1113 1114 numops = getxdr_long(); 1115 (void) sprintf(get_line(0, 0), "Number of operations = %d", | 1110 1111 numops = getxdr_long(); 1112 (void) sprintf(get_line(0, 0), "Number of operations = %d", |
1116 numops); | 1113 numops); |
1117 1118 while (numops-- > 0) { 1119 bzero(&one_op, sizeof (one_op)); 1120 if (!xdr_nfs_cb_argop4(&xdrm, &one_op)) { 1121 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 1122 longjmp(xdr_err, 1); 1123 } 1124 1125 get_line(0, 0); /* blank line to separate ops */ 1126 sprintf(get_line(0, 0), "Op = %d (%s)", | 1114 1115 while (numops-- > 0) { 1116 bzero(&one_op, sizeof (one_op)); 1117 if (!xdr_nfs_cb_argop4(&xdrm, &one_op)) { 1118 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 1119 longjmp(xdr_err, 1); 1120 } 1121 1122 get_line(0, 0); /* blank line to separate ops */ 1123 sprintf(get_line(0, 0), "Op = %d (%s)", |
1127 one_op.argop, cb_opcode_name(one_op.argop)); | 1124 one_op.argop, cb_opcode_name(one_op.argop)); |
1128 if (one_op.argop < cb_num_opcodes) { 1129 fmtproc = cb_opcode_info[one_op.argop].dtlarg; 1130 if (fmtproc != NULL) 1131 fmtproc(&one_op.nfs_cb_argop4_u); 1132 } 1133 1134 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 1135 } --- 127 unchanged lines hidden (view full) --- 1263static char * 1264_sum_stateid(stateid4 *stateid, char *prefix) 1265{ 1266 static char buf[32]; 1267 int spec; 1268 1269 if ((spec = special_stateid(stateid)) < 0) 1270 snprintf(buf, sizeof (buf), "%s%04X:%u", prefix, | 1125 if (one_op.argop < cb_num_opcodes) { 1126 fmtproc = cb_opcode_info[one_op.argop].dtlarg; 1127 if (fmtproc != NULL) 1128 fmtproc(&one_op.nfs_cb_argop4_u); 1129 } 1130 1131 xdr_free(xdr_nfs_cb_argop4, (char *)&one_op); 1132 } --- 127 unchanged lines hidden (view full) --- 1260static char * 1261_sum_stateid(stateid4 *stateid, char *prefix) 1262{ 1263 static char buf[32]; 1264 int spec; 1265 1266 if ((spec = special_stateid(stateid)) < 0) 1267 snprintf(buf, sizeof (buf), "%s%04X:%u", prefix, |
1271 stateid_hash(stateid), stateid->seqid); | 1268 stateid_hash(stateid), stateid->seqid); |
1272 else 1273 snprintf(buf, sizeof (buf), "%s%s", prefix, | 1269 else 1270 snprintf(buf, sizeof (buf), "%s%s", prefix, |
1274 spec == 0 ? "SPC0" : (spec == 1 ? "SPC1" : "SPC?")); | 1271 spec == 0 ? "SPC0" : (spec == 1 ? "SPC1" : "SPC?")); |
1275 return (buf); 1276} 1277 1278static void 1279_detail_stateid(stateid4 *stateid, char *prefix) 1280{ 1281 int spec; 1282 char seqstr[32] = {0}; 1283 1284 spec = special_stateid(stateid); 1285 1286 if (spec < 0) 1287 sprintf(get_line(0, 0), "%sState ID hash = %04X", | 1272 return (buf); 1273} 1274 1275static void 1276_detail_stateid(stateid4 *stateid, char *prefix) 1277{ 1278 int spec; 1279 char seqstr[32] = {0}; 1280 1281 spec = special_stateid(stateid); 1282 1283 if (spec < 0) 1284 sprintf(get_line(0, 0), "%sState ID hash = %04X", |
1288 prefix, stateid_hash(stateid)); | 1285 prefix, stateid_hash(stateid)); |
1289 else 1290 sprintf(get_line(0, 0), "%sState ID hash = %s", prefix, | 1286 else 1287 sprintf(get_line(0, 0), "%sState ID hash = %s", prefix, |
1291 spec == 0 ? "SPECIAL_0" : 1292 (spec == 1 ? "SPECIAL_1" : "SPECIAL_?")); | 1288 spec == 0 ? "SPECIAL_0" : 1289 (spec == 1 ? "SPECIAL_1" : "SPECIAL_?")); |
1293 1294 sprintf(get_line(0, 0), " len = %u val = %s", | 1290 1291 sprintf(get_line(0, 0), " len = %u val = %s", |
1295 sizeof (stateid->other), 1296 tohex(stateid->other, sizeof (stateid->other))); | 1292 sizeof (stateid->other), 1293 tohex(stateid->other, sizeof (stateid->other))); |
1297 1298 /* 1299 * If spec 0/1 stateid, print seqid in hex; otherwise, 1300 * use decimal. This makes it more clear how spec stateids 1301 * are constructed [obvious that either all bits are 0, or all 1302 * bits are 1]. 1303 */ 1304 if (spec == -1) 1305 sprintf(seqstr, "%d", stateid->seqid); 1306 else 1307 sprintf(seqstr, "%08X", stateid->seqid); 1308 1309 sprintf(get_line(0, 0), " %sState ID Sequence ID = %s", | 1294 1295 /* 1296 * If spec 0/1 stateid, print seqid in hex; otherwise, 1297 * use decimal. This makes it more clear how spec stateids 1298 * are constructed [obvious that either all bits are 0, or all 1299 * bits are 1]. 1300 */ 1301 if (spec == -1) 1302 sprintf(seqstr, "%d", stateid->seqid); 1303 else 1304 sprintf(seqstr, "%08X", stateid->seqid); 1305 1306 sprintf(get_line(0, 0), " %sState ID Sequence ID = %s", |
1310 prefix, seqstr); | 1307 prefix, seqstr); |
1311} 1312 1313 1314static char * 1315sum_lock_denied(LOCK4denied *denied) 1316{ 1317 static char buf[64]; 1318 1319 sprintf(buf, "%s %llu %llu LO=%04X", | 1308} 1309 1310 1311static char * 1312sum_lock_denied(LOCK4denied *denied) 1313{ 1314 static char buf[64]; 1315 1316 sprintf(buf, "%s %llu %llu LO=%04X", |
1320 sum_lock_type_name(denied->locktype), 1321 denied->offset, denied->length, 1322 owner_hash(&denied->owner.owner)); | 1317 sum_lock_type_name(denied->locktype), 1318 denied->offset, denied->length, 1319 owner_hash(&denied->owner.owner)); |
1323 1324 return (buf); 1325} 1326 1327static void 1328detail_lock_denied(LOCK4denied *denied) 1329{ 1330 sprintf(get_line(0, 0), "Type = %s", lock_type_name(denied->locktype)); --- 32 unchanged lines hidden (view full) --- 1363/* 1364 * detail_createhow4: print detail information about "how". 1365 */ 1366 1367static void 1368detail_createhow4(createhow4 *crtp) 1369{ 1370 sprintf(get_line(0, 0), "Method = %s", | 1320 1321 return (buf); 1322} 1323 1324static void 1325detail_lock_denied(LOCK4denied *denied) 1326{ 1327 sprintf(get_line(0, 0), "Type = %s", lock_type_name(denied->locktype)); --- 32 unchanged lines hidden (view full) --- 1360/* 1361 * detail_createhow4: print detail information about "how". 1362 */ 1363 1364static void 1365detail_createhow4(createhow4 *crtp) 1366{ 1367 sprintf(get_line(0, 0), "Method = %s", |
1371 createhow4_name(crtp)); | 1368 createhow4_name(crtp)); |
1372 1373 switch (crtp->mode) { 1374 case UNCHECKED4: 1375 case GUARDED4: 1376 detail_fattr4(&crtp->createhow4_u.createattrs); 1377 break; 1378 case EXCLUSIVE4: 1379 sprintf(get_line(0, 0), " Verifier = %s", | 1369 1370 switch (crtp->mode) { 1371 case UNCHECKED4: 1372 case GUARDED4: 1373 detail_fattr4(&crtp->createhow4_u.createattrs); 1374 break; 1375 case EXCLUSIVE4: 1376 sprintf(get_line(0, 0), " Verifier = %s", |
1380 tohex(crtp->createhow4_u.createverf, 1381 NFS4_VERIFIER_SIZE)); | 1377 tohex(crtp->createhow4_u.createverf, 1378 NFS4_VERIFIER_SIZE)); |
1382 break; 1383 } 1384} 1385 1386static void 1387detail_createtype4(createtype4 *crtp) 1388{ 1389 sprintf(get_line(0, 0), "Type = %s", | 1379 break; 1380 } 1381} 1382 1383static void 1384detail_createtype4(createtype4 *crtp) 1385{ 1386 sprintf(get_line(0, 0), "Type = %s", |
1390 detail_type_name(crtp->type)); | 1387 detail_type_name(crtp->type)); |
1391 switch (crtp->type) { 1392 case NF4LNK: 1393 sprintf(get_line(0, 0), "Linkdata = %s", | 1388 switch (crtp->type) { 1389 case NF4LNK: 1390 sprintf(get_line(0, 0), "Linkdata = %s", |
1394 utf8localize(&crtp->createtype4_u.linkdata)); | 1391 utf8localize(&crtp->createtype4_u.linkdata)); |
1395 break; 1396 case NF4BLK: 1397 case NF4CHR: 1398 sprintf(get_line(0, 0), "Specdata1 = %04x Specdata2 = %04x", | 1392 break; 1393 case NF4BLK: 1394 case NF4CHR: 1395 sprintf(get_line(0, 0), "Specdata1 = %04x Specdata2 = %04x", |
1399 crtp->createtype4_u.devdata.specdata1, 1400 crtp->createtype4_u.devdata.specdata2); | 1396 crtp->createtype4_u.devdata.specdata1, 1397 crtp->createtype4_u.devdata.specdata2); |
1401 break; 1402 default: 1403 break; 1404 } 1405} 1406 1407static void 1408sumarg_access(char *buf, size_t buflen, void *obj) --- 12 unchanged lines hidden (view full) --- 1421} 1422 1423static void 1424sumarg_close(char *buf, size_t buflen, void *obj) 1425{ 1426 CLOSE4args *args = (CLOSE4args *)obj; 1427 1428 snprintf(buf, buflen, "SQ=%u %s", | 1398 break; 1399 default: 1400 break; 1401 } 1402} 1403 1404static void 1405sumarg_access(char *buf, size_t buflen, void *obj) --- 12 unchanged lines hidden (view full) --- 1418} 1419 1420static void 1421sumarg_close(char *buf, size_t buflen, void *obj) 1422{ 1423 CLOSE4args *args = (CLOSE4args *)obj; 1424 1425 snprintf(buf, buflen, "SQ=%u %s", |
1429 args->seqid, sum_open_stateid(&args->open_stateid)); | 1426 args->seqid, sum_open_stateid(&args->open_stateid)); |
1430} 1431 1432static void 1433dtlarg_close(void *obj) 1434{ 1435 CLOSE4args *args = (CLOSE4args *)obj; 1436 1437 detail_open_stateid(&args->open_stateid); 1438 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1439} 1440 1441static void 1442sumarg_commit(char *buf, size_t buflen, void *obj) 1443{ 1444 COMMIT4args *args = (COMMIT4args *)obj; 1445 1446 snprintf(buf, buflen, "at %llu for %u ", args->offset, | 1427} 1428 1429static void 1430dtlarg_close(void *obj) 1431{ 1432 CLOSE4args *args = (CLOSE4args *)obj; 1433 1434 detail_open_stateid(&args->open_stateid); 1435 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1436} 1437 1438static void 1439sumarg_commit(char *buf, size_t buflen, void *obj) 1440{ 1441 COMMIT4args *args = (COMMIT4args *)obj; 1442 1443 snprintf(buf, buflen, "at %llu for %u ", args->offset, |
1447 args->count); | 1444 args->count); |
1448} 1449 1450static void 1451dtlarg_commit(void *obj) 1452{ 1453 COMMIT4args *args = (COMMIT4args *)obj; 1454 1455 sprintf(get_line(0, 0), "Offset = %llu", args->offset); --- 17 unchanged lines hidden (view full) --- 1473} 1474 1475static void 1476sumarg_create(char *buf, size_t buflen, void *obj) 1477{ 1478 CREATE4args *args = (CREATE4args *)obj; 1479 1480 snprintf(buf, buflen, "%s %s ", component_name(&args->objname), | 1445} 1446 1447static void 1448dtlarg_commit(void *obj) 1449{ 1450 COMMIT4args *args = (COMMIT4args *)obj; 1451 1452 sprintf(get_line(0, 0), "Offset = %llu", args->offset); --- 17 unchanged lines hidden (view full) --- 1470} 1471 1472static void 1473sumarg_create(char *buf, size_t buflen, void *obj) 1474{ 1475 CREATE4args *args = (CREATE4args *)obj; 1476 1477 snprintf(buf, buflen, "%s %s ", component_name(&args->objname), |
1481 sum_type_name(args->objtype.type)); | 1478 sum_type_name(args->objtype.type)); |
1482} 1483 1484static void 1485dtlarg_create(void *obj) 1486{ 1487 CREATE4args *args = (CREATE4args *)obj; 1488 1489 sprintf(get_line(0, 0), "Name = %s", component_name(&args->objname)); --- 71 unchanged lines hidden (view full) --- 1561 1562static void 1563sumarg_cb_recall(char *buf, size_t buflen, void *obj) 1564{ 1565 CB_RECALL4args *args = (CB_RECALL4args *)obj; 1566 char *bp = buf; 1567 1568 snprintf(bp, buflen, "%s %s TR=%s", sum_fh4(&args->fh), | 1479} 1480 1481static void 1482dtlarg_create(void *obj) 1483{ 1484 CREATE4args *args = (CREATE4args *)obj; 1485 1486 sprintf(get_line(0, 0), "Name = %s", component_name(&args->objname)); --- 71 unchanged lines hidden (view full) --- 1558 1559static void 1560sumarg_cb_recall(char *buf, size_t buflen, void *obj) 1561{ 1562 CB_RECALL4args *args = (CB_RECALL4args *)obj; 1563 char *bp = buf; 1564 1565 snprintf(bp, buflen, "%s %s TR=%s", sum_fh4(&args->fh), |
1569 sum_stateid(&args->stateid), args->truncate ? "T" : "F"); | 1566 sum_stateid(&args->stateid), args->truncate ? "T" : "F"); |
1570} 1571 1572static void 1573dtlarg_cb_recall(void *obj) 1574{ 1575 CB_RECALL4args *args = (CB_RECALL4args *)obj; 1576 1577 detail_fh4(&args->fh); 1578 detail_stateid(&args->stateid); 1579 sprintf(get_line(0, 0), "Truncate = %s", | 1567} 1568 1569static void 1570dtlarg_cb_recall(void *obj) 1571{ 1572 CB_RECALL4args *args = (CB_RECALL4args *)obj; 1573 1574 detail_fh4(&args->fh); 1575 detail_stateid(&args->stateid); 1576 sprintf(get_line(0, 0), "Truncate = %s", |
1580 args->truncate ? "True" : "False"); | 1577 args->truncate ? "True" : "False"); |
1581} 1582 1583 1584/* 1585 * name openhow seqid claim access deny owner 1586 */ 1587static void 1588sumarg_open(char *buf, size_t buflen, void *obj) --- 14 unchanged lines hidden (view full) --- 1603 bp += (len = strlen(bp)); 1604 blen -= len; 1605 1606 sum_claim(bp, blen, &args->claim); 1607 bp += (len = strlen(bp)); 1608 blen -= len; 1609 1610 snprintf(bp, blen, " AC=%s DN=%s OO=%04X", | 1578} 1579 1580 1581/* 1582 * name openhow seqid claim access deny owner 1583 */ 1584static void 1585sumarg_open(char *buf, size_t buflen, void *obj) --- 14 unchanged lines hidden (view full) --- 1600 bp += (len = strlen(bp)); 1601 blen -= len; 1602 1603 sum_claim(bp, blen, &args->claim); 1604 bp += (len = strlen(bp)); 1605 blen -= len; 1606 1607 snprintf(bp, blen, " AC=%s DN=%s OO=%04X", |
1611 sum_open_share_access(args->share_access), 1612 sum_open_share_deny(args->share_deny), 1613 owner_hash(&args->owner.owner)); | 1608 sum_open_share_access(args->share_access), 1609 sum_open_share_deny(args->share_deny), 1610 owner_hash(&args->owner.owner)); |
1614} 1615 1616static void 1617dtlarg_open(void *obj) 1618{ 1619 OPEN4args *args = (OPEN4args *)obj; 1620 1621 detail_claim(&args->claim); 1622 detail_openflag(&args->openhow); 1623 detail_open_owner(&args->owner); 1624 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1625 sprintf(get_line(0, 0), "Access = 0x%x (%s)", | 1611} 1612 1613static void 1614dtlarg_open(void *obj) 1615{ 1616 OPEN4args *args = (OPEN4args *)obj; 1617 1618 detail_claim(&args->claim); 1619 detail_openflag(&args->openhow); 1620 detail_open_owner(&args->owner); 1621 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1622 sprintf(get_line(0, 0), "Access = 0x%x (%s)", |
1626 args->share_access, sum_open_share_access(args->share_access)); | 1623 args->share_access, sum_open_share_access(args->share_access)); |
1627 sprintf(get_line(0, 0), "Deny = 0x%x (%s)", | 1624 sprintf(get_line(0, 0), "Deny = 0x%x (%s)", |
1628 args->share_deny, sum_open_share_access(args->share_deny)); | 1625 args->share_deny, sum_open_share_access(args->share_deny)); |
1629} 1630 1631static void 1632sumarg_openattr(char *buf, size_t buflen, void *obj) 1633{ 1634 OPENATTR4args *args = (OPENATTR4args *)obj; 1635 1636 snprintf(buf, buflen, "CD=%s", | 1626} 1627 1628static void 1629sumarg_openattr(char *buf, size_t buflen, void *obj) 1630{ 1631 OPENATTR4args *args = (OPENATTR4args *)obj; 1632 1633 snprintf(buf, buflen, "CD=%s", |
1637 args->createdir ? "T" : "F"); | 1634 args->createdir ? "T" : "F"); |
1638} 1639 1640static void 1641dtlarg_openattr(void *obj) 1642{ 1643 OPENATTR4args *args = (OPENATTR4args *)obj; 1644 1645 sprintf(get_line(0, 0), "CreateDir = %s", | 1635} 1636 1637static void 1638dtlarg_openattr(void *obj) 1639{ 1640 OPENATTR4args *args = (OPENATTR4args *)obj; 1641 1642 sprintf(get_line(0, 0), "CreateDir = %s", |
1646 args->createdir ? "True" : "False"); | 1643 args->createdir ? "True" : "False"); |
1647} 1648 1649static void 1650sumarg_open_confirm(char *buf, size_t buflen, void *obj) 1651{ 1652 char *bp = buf; 1653 OPEN_CONFIRM4args *args = (OPEN_CONFIRM4args *)obj; 1654 1655 snprintf(bp, buflen, "SQ=%u %s", args->seqid, | 1644} 1645 1646static void 1647sumarg_open_confirm(char *buf, size_t buflen, void *obj) 1648{ 1649 char *bp = buf; 1650 OPEN_CONFIRM4args *args = (OPEN_CONFIRM4args *)obj; 1651 1652 snprintf(bp, buflen, "SQ=%u %s", args->seqid, |
1656 sum_open_stateid(&args->open_stateid)); | 1653 sum_open_stateid(&args->open_stateid)); |
1657} 1658 1659static void 1660dtlarg_open_confirm(void *obj) 1661{ 1662 OPEN_CONFIRM4args *args = (OPEN_CONFIRM4args *)obj; 1663 1664 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1665 detail_open_stateid(&args->open_stateid); 1666} 1667 1668static void 1669sumarg_open_downgrd(char *buf, size_t buflen, void *obj) 1670{ 1671 OPEN_DOWNGRADE4args *args = (OPEN_DOWNGRADE4args *)obj; 1672 1673 snprintf(buf, buflen, "SQ=%u %s AC=%s DN=%s", | 1654} 1655 1656static void 1657dtlarg_open_confirm(void *obj) 1658{ 1659 OPEN_CONFIRM4args *args = (OPEN_CONFIRM4args *)obj; 1660 1661 sprintf(get_line(0, 0), "Sequence ID = %u", args->seqid); 1662 detail_open_stateid(&args->open_stateid); 1663} 1664 1665static void 1666sumarg_open_downgrd(char *buf, size_t buflen, void *obj) 1667{ 1668 OPEN_DOWNGRADE4args *args = (OPEN_DOWNGRADE4args *)obj; 1669 1670 snprintf(buf, buflen, "SQ=%u %s AC=%s DN=%s", |
1674 args->seqid, sum_open_stateid(&args->open_stateid), 1675 sum_open_share_access(args->share_access), 1676 sum_open_share_deny(args->share_deny)); | 1671 args->seqid, sum_open_stateid(&args->open_stateid), 1672 sum_open_share_access(args->share_access), 1673 sum_open_share_deny(args->share_deny)); |
1677} 1678 1679static void 1680dtlarg_open_downgrd(void *obj) 1681{ 1682 OPEN_DOWNGRADE4args *args = (OPEN_DOWNGRADE4args *)obj; 1683 1684 sprintf(get_line(0, 0), "Open Sequence ID = %u", args->seqid); 1685 detail_open_stateid(&args->open_stateid); 1686 sprintf(get_line(0, 0), "Access = 0x%x (%s)", | 1674} 1675 1676static void 1677dtlarg_open_downgrd(void *obj) 1678{ 1679 OPEN_DOWNGRADE4args *args = (OPEN_DOWNGRADE4args *)obj; 1680 1681 sprintf(get_line(0, 0), "Open Sequence ID = %u", args->seqid); 1682 detail_open_stateid(&args->open_stateid); 1683 sprintf(get_line(0, 0), "Access = 0x%x (%s)", |
1687 args->share_access, sum_open_share_access(args->share_access)); | 1684 args->share_access, sum_open_share_access(args->share_access)); |
1688 sprintf(get_line(0, 0), "Deny = 0x%x (%s)", | 1685 sprintf(get_line(0, 0), "Deny = 0x%x (%s)", |
1689 args->share_deny, sum_open_share_access(args->share_deny)); | 1686 args->share_deny, sum_open_share_access(args->share_deny)); |
1690} 1691 1692static void 1693sumarg_putfh(char *buf, size_t buflen, void *obj) 1694{ 1695 PUTFH4args *args = (PUTFH4args *)obj; 1696 1697 snprintf(buf, buflen, "%s", sum_fh4(&args->object)); --- 16 unchanged lines hidden (view full) --- 1714} 1715 1716static void 1717dtlarg_link(void *obj) 1718{ 1719 LINK4args *args = (LINK4args *)obj; 1720 1721 sprintf(get_line(0, 0), "New name = %s", | 1687} 1688 1689static void 1690sumarg_putfh(char *buf, size_t buflen, void *obj) 1691{ 1692 PUTFH4args *args = (PUTFH4args *)obj; 1693 1694 snprintf(buf, buflen, "%s", sum_fh4(&args->object)); --- 16 unchanged lines hidden (view full) --- 1711} 1712 1713static void 1714dtlarg_link(void *obj) 1715{ 1716 LINK4args *args = (LINK4args *)obj; 1717 1718 sprintf(get_line(0, 0), "New name = %s", |
1722 component_name(&args->newname)); | 1719 component_name(&args->newname)); |
1723} 1724 1725static void 1726sum_open_to_lock_owner(char *buf, int buflen, open_to_lock_owner4 *own) 1727{ 1728 snprintf(buf, buflen, " OSQ=%u %s LSQ=%u LO=%04X", own->open_seqid, | 1720} 1721 1722static void 1723sum_open_to_lock_owner(char *buf, int buflen, open_to_lock_owner4 *own) 1724{ 1725 snprintf(buf, buflen, " OSQ=%u %s LSQ=%u LO=%04X", own->open_seqid, |
1729 sum_open_stateid(&own->open_stateid), own->lock_seqid, 1730 owner_hash(&own->lock_owner.owner)); | 1726 sum_open_stateid(&own->open_stateid), own->lock_seqid, 1727 owner_hash(&own->lock_owner.owner)); |
1731} 1732 1733static void 1734sum_exist_lock_owner(char *buf, int buflen, exist_lock_owner4 *own) 1735{ 1736 snprintf(buf, buflen, " LSQ=%u %s", own->lock_seqid, | 1728} 1729 1730static void 1731sum_exist_lock_owner(char *buf, int buflen, exist_lock_owner4 *own) 1732{ 1733 snprintf(buf, buflen, " LSQ=%u %s", own->lock_seqid, |
1737 sum_lock_stateid(&own->lock_stateid)); | 1734 sum_lock_stateid(&own->lock_stateid)); |
1738} 1739 1740static void 1741sum_locker(char *buf, size_t len, locker4 *lk) 1742{ 1743 if (lk->new_lock_owner == TRUE) 1744 sum_open_to_lock_owner(buf, len, &lk->locker4_u.open_owner); 1745 else --- 28 unchanged lines hidden (view full) --- 1774 1775static void 1776sumarg_lock(char *buf, size_t buflen, void *obj) 1777{ 1778 LOCK4args *args = (LOCK4args *)obj; 1779 char *bp = buf; 1780 1781 snprintf(buf, buflen, "%s%s%llu:%llu", | 1735} 1736 1737static void 1738sum_locker(char *buf, size_t len, locker4 *lk) 1739{ 1740 if (lk->new_lock_owner == TRUE) 1741 sum_open_to_lock_owner(buf, len, &lk->locker4_u.open_owner); 1742 else --- 28 unchanged lines hidden (view full) --- 1771 1772static void 1773sumarg_lock(char *buf, size_t buflen, void *obj) 1774{ 1775 LOCK4args *args = (LOCK4args *)obj; 1776 char *bp = buf; 1777 1778 snprintf(buf, buflen, "%s%s%llu:%llu", |
1782 sum_lock_type_name(args->locktype), 1783 args->reclaim ? " reclaim " : " ", 1784 args->offset, args->length); | 1779 sum_lock_type_name(args->locktype), 1780 args->reclaim ? " reclaim " : " ", 1781 args->offset, args->length); |
1785 1786 bp += strlen(buf); 1787 sum_locker(bp, buflen - (bp - buf), &args->locker); 1788} 1789 1790static void 1791detail_open_to_lock_owner(open_to_lock_owner4 *own) 1792{ --- 21 unchanged lines hidden (view full) --- 1814 1815static void 1816dtlarg_lock(void *obj) 1817{ 1818 LOCK4args *args = (LOCK4args *)obj; 1819 1820 sprintf(get_line(0, 0), "Type = %s", lock_type_name(args->locktype)); 1821 sprintf(get_line(0, 0), "Reclaim = %s", | 1782 1783 bp += strlen(buf); 1784 sum_locker(bp, buflen - (bp - buf), &args->locker); 1785} 1786 1787static void 1788detail_open_to_lock_owner(open_to_lock_owner4 *own) 1789{ --- 21 unchanged lines hidden (view full) --- 1811 1812static void 1813dtlarg_lock(void *obj) 1814{ 1815 LOCK4args *args = (LOCK4args *)obj; 1816 1817 sprintf(get_line(0, 0), "Type = %s", lock_type_name(args->locktype)); 1818 sprintf(get_line(0, 0), "Reclaim = %s", |
1822 args->reclaim ? "TRUE" : "FALSE"); | 1819 args->reclaim ? "TRUE" : "FALSE"); |
1823 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1824 sprintf(get_line(0, 0), "Length = %llu", args->length); 1825 detail_locker(&args->locker); 1826} 1827 1828static void 1829sumarg_lockt(char *buf, size_t buflen, void *obj) 1830{ 1831 LOCKT4args *args = (LOCKT4args *)obj; 1832 1833 snprintf(buf, buflen, "R=%llu:%llu", | 1820 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1821 sprintf(get_line(0, 0), "Length = %llu", args->length); 1822 detail_locker(&args->locker); 1823} 1824 1825static void 1826sumarg_lockt(char *buf, size_t buflen, void *obj) 1827{ 1828 LOCKT4args *args = (LOCKT4args *)obj; 1829 1830 snprintf(buf, buflen, "R=%llu:%llu", |
1834 args->offset, args->length); | 1831 args->offset, args->length); |
1835} 1836 1837static void 1838dtlarg_lockt(void *obj) 1839{ 1840 LOCKT4args *args = (LOCKT4args *)obj; 1841 1842 sprintf(get_line(0, 0), "Type = %s", lock_type_name(args->locktype)); 1843 detail_lock_owner(&args->owner); 1844 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1845 sprintf(get_line(0, 0), "Length = %llu", args->length); 1846} 1847 1848static void 1849sumarg_locku(char *buf, size_t buflen, void *obj) 1850{ 1851 LOCKU4args *args = (LOCKU4args *)obj; 1852 1853 snprintf(buf, buflen, "R=%llu:%llu LSQ=%u %s", | 1832} 1833 1834static void 1835dtlarg_lockt(void *obj) 1836{ 1837 LOCKT4args *args = (LOCKT4args *)obj; 1838 1839 sprintf(get_line(0, 0), "Type = %s", lock_type_name(args->locktype)); 1840 detail_lock_owner(&args->owner); 1841 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1842 sprintf(get_line(0, 0), "Length = %llu", args->length); 1843} 1844 1845static void 1846sumarg_locku(char *buf, size_t buflen, void *obj) 1847{ 1848 LOCKU4args *args = (LOCKU4args *)obj; 1849 1850 snprintf(buf, buflen, "R=%llu:%llu LSQ=%u %s", |
1854 args->offset, args->length, args->seqid, 1855 sum_lock_stateid(&args->lock_stateid)); | 1851 args->offset, args->length, args->seqid, 1852 sum_lock_stateid(&args->lock_stateid)); |
1856} 1857 1858 1859static void 1860dtlarg_locku(void *obj) 1861{ 1862 LOCKU4args *args = (LOCKU4args *)obj; 1863 --- 21 unchanged lines hidden (view full) --- 1885} 1886 1887static void 1888sumarg_read(char *buf, size_t buflen, void *obj) 1889{ 1890 READ4args *args = (READ4args *)obj; 1891 1892 snprintf(buf, buflen, "%s at %llu for %u", | 1853} 1854 1855 1856static void 1857dtlarg_locku(void *obj) 1858{ 1859 LOCKU4args *args = (LOCKU4args *)obj; 1860 --- 21 unchanged lines hidden (view full) --- 1882} 1883 1884static void 1885sumarg_read(char *buf, size_t buflen, void *obj) 1886{ 1887 READ4args *args = (READ4args *)obj; 1888 1889 snprintf(buf, buflen, "%s at %llu for %u", |
1893 sum_stateid(&args->stateid), args->offset, args->count); | 1890 sum_stateid(&args->stateid), args->offset, args->count); |
1894} 1895 1896static void 1897dtlarg_read(void *obj) 1898{ 1899 READ4args *args = (READ4args *)obj; 1900 1901 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1902 sprintf(get_line(0, 0), "Count = %u", args->count); 1903 detail_stateid(&args->stateid); 1904} 1905 1906static void 1907sumarg_readdir(char *buf, size_t buflen, void *obj) 1908{ 1909 READDIR4args *args = (READDIR4args *)obj; 1910 1911 snprintf(buf, buflen, "Cookie=%llu (%s) for %u/%u", | 1891} 1892 1893static void 1894dtlarg_read(void *obj) 1895{ 1896 READ4args *args = (READ4args *)obj; 1897 1898 sprintf(get_line(0, 0), "Offset = %llu", args->offset); 1899 sprintf(get_line(0, 0), "Count = %u", args->count); 1900 detail_stateid(&args->stateid); 1901} 1902 1903static void 1904sumarg_readdir(char *buf, size_t buflen, void *obj) 1905{ 1906 READDIR4args *args = (READDIR4args *)obj; 1907 1908 snprintf(buf, buflen, "Cookie=%llu (%s) for %u/%u", |
1912 args->cookie, tohex(args->cookieverf, NFS4_VERIFIER_SIZE), 1913 args->dircount, args->maxcount); | 1909 args->cookie, tohex(args->cookieverf, NFS4_VERIFIER_SIZE), 1910 args->dircount, args->maxcount); |
1914} 1915 1916static void 1917dtlarg_readdir(void *obj) 1918{ 1919 READDIR4args *args = (READDIR4args *)obj; 1920 1921 sprintf(get_line(0, 0), "Cookie = %llu", args->cookie); 1922 sprintf(get_line(0, 0), "Verifier = %s", | 1911} 1912 1913static void 1914dtlarg_readdir(void *obj) 1915{ 1916 READDIR4args *args = (READDIR4args *)obj; 1917 1918 sprintf(get_line(0, 0), "Cookie = %llu", args->cookie); 1919 sprintf(get_line(0, 0), "Verifier = %s", |
1923 tohex(args->cookieverf, NFS4_VERIFIER_SIZE)); | 1920 tohex(args->cookieverf, NFS4_VERIFIER_SIZE)); |
1924 sprintf(get_line(0, 0), "Dircount = %u", args->dircount); 1925 sprintf(get_line(0, 0), "Maxcount = %u", args->maxcount); 1926 detail_attr_bitmap("", &args->attr_request, NULL); 1927} 1928 1929static void 1930dtlarg_release_lkown(void *obj) 1931{ --- 12 unchanged lines hidden (view full) --- 1944} 1945 1946static void 1947sumarg_rename(char *buf, size_t buflen, void *obj) 1948{ 1949 RENAME4args *args = (RENAME4args *)obj; 1950 1951 snprintf(buf, buflen, "%s to %s", | 1921 sprintf(get_line(0, 0), "Dircount = %u", args->dircount); 1922 sprintf(get_line(0, 0), "Maxcount = %u", args->maxcount); 1923 detail_attr_bitmap("", &args->attr_request, NULL); 1924} 1925 1926static void 1927dtlarg_release_lkown(void *obj) 1928{ --- 12 unchanged lines hidden (view full) --- 1941} 1942 1943static void 1944sumarg_rename(char *buf, size_t buflen, void *obj) 1945{ 1946 RENAME4args *args = (RENAME4args *)obj; 1947 1948 snprintf(buf, buflen, "%s to %s", |
1952 component_name(&args->oldname), 1953 component_name(&args->newname)); | 1949 component_name(&args->oldname), 1950 component_name(&args->newname)); |
1954} 1955 1956static void 1957dtlarg_rename(void *obj) 1958{ 1959 RENAME4args *args = (RENAME4args *)obj; 1960 1961 sprintf(get_line(0, 0), "Old name = %s", | 1951} 1952 1953static void 1954dtlarg_rename(void *obj) 1955{ 1956 RENAME4args *args = (RENAME4args *)obj; 1957 1958 sprintf(get_line(0, 0), "Old name = %s", |
1962 component_name(&args->oldname)); | 1959 component_name(&args->oldname)); |
1963 sprintf(get_line(0, 0), "New name = %s", | 1960 sprintf(get_line(0, 0), "New name = %s", |
1964 component_name(&args->newname)); | 1961 component_name(&args->newname)); |
1965} 1966 1967static void 1968sumarg_renew(char *buf, size_t buflen, void *obj) 1969{ 1970 RENEW4args *args = (RENEW4args *)obj; 1971 1972 snprintf(buf, buflen, "%s", sum_clientid(args->clientid)); --- 7 unchanged lines hidden (view full) --- 1980} 1981 1982static void 1983sumarg_secinfo(char *buf, size_t buflen, void *obj) 1984{ 1985 SECINFO4args *args = (SECINFO4args *)obj; 1986 1987 snprintf(buf, buflen, "%s", | 1962} 1963 1964static void 1965sumarg_renew(char *buf, size_t buflen, void *obj) 1966{ 1967 RENEW4args *args = (RENEW4args *)obj; 1968 1969 snprintf(buf, buflen, "%s", sum_clientid(args->clientid)); --- 7 unchanged lines hidden (view full) --- 1977} 1978 1979static void 1980sumarg_secinfo(char *buf, size_t buflen, void *obj) 1981{ 1982 SECINFO4args *args = (SECINFO4args *)obj; 1983 1984 snprintf(buf, buflen, "%s", |
1988 component_name(&args->name)); | 1985 component_name(&args->name)); |
1989} 1990 1991static void 1992dtlarg_secinfo(void *obj) 1993{ 1994 SECINFO4args *args = (SECINFO4args *)obj; 1995 1996 sprintf(get_line(0, 0), "Name = %s", | 1986} 1987 1988static void 1989dtlarg_secinfo(void *obj) 1990{ 1991 SECINFO4args *args = (SECINFO4args *)obj; 1992 1993 sprintf(get_line(0, 0), "Name = %s", |
1997 component_name(&args->name)); | 1994 component_name(&args->name)); |
1998} 1999 2000static void 2001sumarg_setattr(char *buf, size_t buflen, void *obj) 2002{ 2003 SETATTR4args *args = (SETATTR4args *)obj; 2004 2005 snprintf(buf, buflen, "%s", sum_stateid(&args->stateid)); --- 9 unchanged lines hidden (view full) --- 2015} 2016 2017static void 2018sumarg_setclid(char *buf, size_t buflen, void *obj) 2019{ 2020 SETCLIENTID4args *args = (SETCLIENTID4args *)obj; 2021 2022 snprintf(buf, buflen, "Prog=%u ID=%s Addr=%s CBID=%u", | 1995} 1996 1997static void 1998sumarg_setattr(char *buf, size_t buflen, void *obj) 1999{ 2000 SETATTR4args *args = (SETATTR4args *)obj; 2001 2002 snprintf(buf, buflen, "%s", sum_stateid(&args->stateid)); --- 9 unchanged lines hidden (view full) --- 2012} 2013 2014static void 2015sumarg_setclid(char *buf, size_t buflen, void *obj) 2016{ 2017 SETCLIENTID4args *args = (SETCLIENTID4args *)obj; 2018 2019 snprintf(buf, buflen, "Prog=%u ID=%s Addr=%s CBID=%u", |
2023 args->callback.cb_program, 2024 args->callback.cb_location.r_netid, 2025 args->callback.cb_location.r_addr, args->callback_ident); | 2020 args->callback.cb_program, 2021 args->callback.cb_location.r_netid, 2022 args->callback.cb_location.r_addr, args->callback_ident); |
2026} 2027 2028static void 2029dtlarg_setclid(void *obj) 2030{ 2031 SETCLIENTID4args *args = (SETCLIENTID4args *)obj; 2032 2033 sprintf(get_line(0, 0), "Verifier=%s", | 2023} 2024 2025static void 2026dtlarg_setclid(void *obj) 2027{ 2028 SETCLIENTID4args *args = (SETCLIENTID4args *)obj; 2029 2030 sprintf(get_line(0, 0), "Verifier=%s", |
2034 tohex(args->client.verifier, NFS4_VERIFIER_SIZE)); | 2031 tohex(args->client.verifier, NFS4_VERIFIER_SIZE)); |
2035 sprintf(get_line(0, 0), "ID = (%d) %s", | 2032 sprintf(get_line(0, 0), "ID = (%d) %s", |
2036 args->client.id.id_len, 2037 tohex(args->client.id.id_val, args->client.id.id_len)); | 2033 args->client.id.id_len, 2034 tohex(args->client.id.id_val, args->client.id.id_len)); |
2038 2039 sprintf(get_line(0, 0), "Callback Program = %u", | 2035 2036 sprintf(get_line(0, 0), "Callback Program = %u", |
2040 args->callback.cb_program); | 2037 args->callback.cb_program); |
2041 sprintf(get_line(0, 0), "Callback Net ID = %s", | 2038 sprintf(get_line(0, 0), "Callback Net ID = %s", |
2042 args->callback.cb_location.r_netid); | 2039 args->callback.cb_location.r_netid); |
2043 sprintf(get_line(0, 0), "Callback Addr = %s", | 2040 sprintf(get_line(0, 0), "Callback Addr = %s", |
2044 args->callback.cb_location.r_addr); | 2041 args->callback.cb_location.r_addr); |
2045 sprintf(get_line(0, 0), "Callback Ident = %u", args->callback_ident); 2046} 2047 2048static void 2049sumarg_setclid_cfm(char *buf, size_t buflen, void *obj) 2050{ 2051 SETCLIENTID_CONFIRM4args *args = (SETCLIENTID_CONFIRM4args *)obj; 2052 2053 snprintf(buf, buflen, "%s CFV=%s", sum_clientid(args->clientid), | 2042 sprintf(get_line(0, 0), "Callback Ident = %u", args->callback_ident); 2043} 2044 2045static void 2046sumarg_setclid_cfm(char *buf, size_t buflen, void *obj) 2047{ 2048 SETCLIENTID_CONFIRM4args *args = (SETCLIENTID_CONFIRM4args *)obj; 2049 2050 snprintf(buf, buflen, "%s CFV=%s", sum_clientid(args->clientid), |
2054 tohex(args->setclientid_confirm, NFS4_VERIFIER_SIZE)); | 2051 tohex(args->setclientid_confirm, NFS4_VERIFIER_SIZE)); |
2055} 2056 2057static void 2058dtlarg_setclid_cfm(void *obj) 2059{ 2060 SETCLIENTID_CONFIRM4args *args = (SETCLIENTID_CONFIRM4args *)obj; 2061 2062 detail_clientid(args->clientid); 2063 sprintf(get_line(0, 0), "Set Client ID Confirm Verifier = %s", | 2052} 2053 2054static void 2055dtlarg_setclid_cfm(void *obj) 2056{ 2057 SETCLIENTID_CONFIRM4args *args = (SETCLIENTID_CONFIRM4args *)obj; 2058 2059 detail_clientid(args->clientid); 2060 sprintf(get_line(0, 0), "Set Client ID Confirm Verifier = %s", |
2064 tohex(args->setclientid_confirm, NFS4_VERIFIER_SIZE)); | 2061 tohex(args->setclientid_confirm, NFS4_VERIFIER_SIZE)); |
2065} 2066 2067 2068static void 2069dtlarg_verify(void *obj) 2070{ 2071 NVERIFY4args *args = (NVERIFY4args *)obj; 2072 2073 detail_fattr4(&args->obj_attributes); 2074} 2075 2076static void 2077sumarg_write(char *buf, size_t buflen, void *obj) 2078{ 2079 WRITE4args *args = (WRITE4args *)obj; 2080 2081 snprintf(buf, buflen, "%s at %llu for %u", | 2062} 2063 2064 2065static void 2066dtlarg_verify(void *obj) 2067{ 2068 NVERIFY4args *args = (NVERIFY4args *)obj; 2069 2070 detail_fattr4(&args->obj_attributes); 2071} 2072 2073static void 2074sumarg_write(char *buf, size_t buflen, void *obj) 2075{ 2076 WRITE4args *args = (WRITE4args *)obj; 2077 2078 snprintf(buf, buflen, "%s at %llu for %u", |
2082 sum_stateid(&args->stateid), args->offset, args->data.data_len); | 2079 sum_stateid(&args->stateid), args->offset, args->data.data_len); |
2083} 2084 2085static void 2086dtlarg_write(void *obj) 2087{ 2088 WRITE4args *args = (WRITE4args *)obj; 2089 2090 sprintf(get_line(0, 0), "Offset = %llu", args->offset); --- 38 unchanged lines hidden (view full) --- 2129detail_fattr4(fattr4 *attrp) 2130{ 2131 unpkd_attrmap_t provided; 2132 uint_t attrnum; 2133 XDR attrxdr; 2134 jmp_buf old_errbuf; 2135 2136 xdrmem_create(&attrxdr, attrp->attr_vals.attrlist4_val, | 2080} 2081 2082static void 2083dtlarg_write(void *obj) 2084{ 2085 WRITE4args *args = (WRITE4args *)obj; 2086 2087 sprintf(get_line(0, 0), "Offset = %llu", args->offset); --- 38 unchanged lines hidden (view full) --- 2126detail_fattr4(fattr4 *attrp) 2127{ 2128 unpkd_attrmap_t provided; 2129 uint_t attrnum; 2130 XDR attrxdr; 2131 jmp_buf old_errbuf; 2132 2133 xdrmem_create(&attrxdr, attrp->attr_vals.attrlist4_val, |
2137 attrp->attr_vals.attrlist4_len, XDR_DECODE); | 2134 attrp->attr_vals.attrlist4_len, XDR_DECODE); |
2138 2139 bcopy(xdr_err, old_errbuf, sizeof (old_errbuf)); 2140 if (setjmp(xdr_err)) { 2141 sprintf(get_line(0, 0), "<attr_vals too short>"); 2142 goto done; 2143 } 2144 2145 detail_attr_bitmap("", &attrp->attrmask, &provided); --- 20 unchanged lines hidden (view full) --- 2166 if (curlen + sizeof ("<Too Long>") >= buflen) { 2167 strcpy(buf + buflen - sizeof ("<Too Long>"), 2168 "<Too Long>"); 2169 return; 2170 } 2171 bp = buf + curlen; 2172 remaining = buflen - curlen; 2173 snprintf(bp, remaining, | 2135 2136 bcopy(xdr_err, old_errbuf, sizeof (old_errbuf)); 2137 if (setjmp(xdr_err)) { 2138 sprintf(get_line(0, 0), "<attr_vals too short>"); 2139 goto done; 2140 } 2141 2142 detail_attr_bitmap("", &attrp->attrmask, &provided); --- 20 unchanged lines hidden (view full) --- 2163 if (curlen + sizeof ("<Too Long>") >= buflen) { 2164 strcpy(buf + buflen - sizeof ("<Too Long>"), 2165 "<Too Long>"); 2166 return; 2167 } 2168 bp = buf + curlen; 2169 remaining = buflen - curlen; 2170 snprintf(bp, remaining, |
2174 num_words == 0 ? "%x" : " %x", 2175 mapp->bitmap4_val[num_words]); | 2171 num_words == 0 ? "%x" : " %x", 2172 mapp->bitmap4_val[num_words]); |
2176 } 2177} 2178 2179/* 2180 * Print detail information for the given attribute bitmap, and fill in the 2181 * unpacked version of the map if "unpacked" is non-null. Returns the 2182 * number of bytes in the bitmap. "prefix" is an initial string that is 2183 * printed at the front of each line. --- 27 unchanged lines hidden (view full) --- 2211 attrnum = num_words * 32 + byte_num * 8; 2212 for (bit = 7; bit >= 0; bit--) { 2213 if (val & (1 << bit)) { 2214 strcat(buf, " "); 2215 strcat(buf, 2216 attr_name(attrnum + bit)); 2217 if (unpacked != NULL) 2218 unpacked->map[attrnum + bit] = | 2173 } 2174} 2175 2176/* 2177 * Print detail information for the given attribute bitmap, and fill in the 2178 * unpacked version of the map if "unpacked" is non-null. Returns the 2179 * number of bytes in the bitmap. "prefix" is an initial string that is 2180 * printed at the front of each line. --- 27 unchanged lines hidden (view full) --- 2208 attrnum = num_words * 32 + byte_num * 8; 2209 for (bit = 7; bit >= 0; bit--) { 2210 if (val & (1 << bit)) { 2211 strcat(buf, " "); 2212 strcat(buf, 2213 attr_name(attrnum + bit)); 2214 if (unpacked != NULL) 2215 unpacked->map[attrnum + bit] = |
2219 1; | 2216 1; |
2220 } 2221 } 2222 } 2223 } 2224} 2225 2226/* 2227 * Format the summary line results from a COMPOUND4 call. --- 5 unchanged lines hidden (view full) --- 2233 nfsstat4 status; 2234 static utf8string tag; 2235 2236 status = getxdr_long(); 2237 if (!xdr_utf8string(&xdrm, &tag)) 2238 longjmp(xdr_err, 1); 2239 2240 sprintf(line, "(%.20s) %s %s", utf8localize(&tag), | 2217 } 2218 } 2219 } 2220 } 2221} 2222 2223/* 2224 * Format the summary line results from a COMPOUND4 call. --- 5 unchanged lines hidden (view full) --- 2230 nfsstat4 status; 2231 static utf8string tag; 2232 2233 status = getxdr_long(); 2234 if (!xdr_utf8string(&xdrm, &tag)) 2235 longjmp(xdr_err, 1); 2236 2237 sprintf(line, "(%.20s) %s %s", utf8localize(&tag), |
2241 status_name(status), sumres_fn()); | 2238 status_name(status), sumres_fn()); |
2242 2243 xdr_free(xdr_utf8string, (char *)&tag); 2244} 2245 2246 2247/* 2248 * Return a set of summary strings for the result data that's next in the 2249 * XDR stream, up to SUM_COMPND_MAX characters. If the strings don't fit, --- 8 unchanged lines hidden (view full) --- 2258 const size_t buflen = sizeof (buf); 2259 char *bp; 2260 nfs_resop4 one_res; 2261 2262 buf[0] = '\0'; 2263 if (setjmp(xdr_err)) { 2264 bp = buf + strlen(buf); 2265 snprintf(bp, buflen - (bp - buf), | 2239 2240 xdr_free(xdr_utf8string, (char *)&tag); 2241} 2242 2243 2244/* 2245 * Return a set of summary strings for the result data that's next in the 2246 * XDR stream, up to SUM_COMPND_MAX characters. If the strings don't fit, --- 8 unchanged lines hidden (view full) --- 2255 const size_t buflen = sizeof (buf); 2256 char *bp; 2257 nfs_resop4 one_res; 2258 2259 buf[0] = '\0'; 2260 if (setjmp(xdr_err)) { 2261 bp = buf + strlen(buf); 2262 snprintf(bp, buflen - (bp - buf), |
2266 nfs4_fragged_rpc ? nfs4err_fragrpc : nfs4err_xdrfrag); | 2263 nfs4_fragged_rpc ? nfs4err_fragrpc : nfs4err_xdrfrag); |
2267 return (buf); 2268 } 2269 2270 numres = getxdr_long(); 2271 bp = buf; 2272 while (numres-- > 0) { 2273 char *result; 2274 2275 bzero(&one_res, sizeof (one_res)); 2276 2277 if (!xdr_nfs_resop4(&xdrm, &one_res)) { 2278 xdr_free(xdr_nfs_resop4, (char *)&one_res); 2279 longjmp(xdr_err, 1); 2280 } 2281 2282 snprintf(bp, buflen - (bp - buf), "%s ", | 2264 return (buf); 2265 } 2266 2267 numres = getxdr_long(); 2268 bp = buf; 2269 while (numres-- > 0) { 2270 char *result; 2271 2272 bzero(&one_res, sizeof (one_res)); 2273 2274 if (!xdr_nfs_resop4(&xdrm, &one_res)) { 2275 xdr_free(xdr_nfs_resop4, (char *)&one_res); 2276 longjmp(xdr_err, 1); 2277 } 2278 2279 snprintf(bp, buflen - (bp - buf), "%s ", |
2283 opcode_name(one_res.resop)); | 2280 opcode_name(one_res.resop)); |
2284 bp += strlen(bp); 2285 2286 result = sum_result(&one_res); 2287 if (strlen(result) > 0) { 2288 snprintf(bp, buflen - (bp - buf), "%s ", result); 2289 bp += strlen(bp); 2290 } 2291 --- 28 unchanged lines hidden (view full) --- 2320 const size_t buflen = sizeof (buf); 2321 char *bp; 2322 nfs_cb_resop4 one_res; 2323 2324 buf[0] = '\0'; 2325 if (setjmp(xdr_err)) { 2326 bp = buf + strlen(buf); 2327 snprintf(bp, buflen - (bp - buf), "<XDR Error or Fragmented" | 2281 bp += strlen(bp); 2282 2283 result = sum_result(&one_res); 2284 if (strlen(result) > 0) { 2285 snprintf(bp, buflen - (bp - buf), "%s ", result); 2286 bp += strlen(bp); 2287 } 2288 --- 28 unchanged lines hidden (view full) --- 2317 const size_t buflen = sizeof (buf); 2318 char *bp; 2319 nfs_cb_resop4 one_res; 2320 2321 buf[0] = '\0'; 2322 if (setjmp(xdr_err)) { 2323 bp = buf + strlen(buf); 2324 snprintf(bp, buflen - (bp - buf), "<XDR Error or Fragmented" |
2328 " RPC>"); | 2325 " RPC>"); |
2329 return (buf); 2330 } 2331 2332 numres = getxdr_long(); 2333 bp = buf; 2334 while (numres-- > 0) { 2335 bzero(&one_res, sizeof (one_res)); 2336 if (!xdr_nfs_cb_resop4(&xdrm, &one_res)) { 2337 xdr_free(xdr_nfs_cb_resop4, (char *)&one_res); 2338 longjmp(xdr_err, 1); 2339 } 2340 snprintf(bp, buflen - (bp - buf), "%s %s ", | 2326 return (buf); 2327 } 2328 2329 numres = getxdr_long(); 2330 bp = buf; 2331 while (numres-- > 0) { 2332 bzero(&one_res, sizeof (one_res)); 2333 if (!xdr_nfs_cb_resop4(&xdrm, &one_res)) { 2334 xdr_free(xdr_nfs_cb_resop4, (char *)&one_res); 2335 longjmp(xdr_err, 1); 2336 } 2337 snprintf(bp, buflen - (bp - buf), "%s %s ", |
2341 cb_opcode_name(one_res.resop), 2342 sum_cb_result(&one_res)); | 2338 cb_opcode_name(one_res.resop), 2339 sum_cb_result(&one_res)); |
2343 bp += strlen(bp); 2344 2345 xdr_free(xdr_nfs_cb_resop4, (char *)&one_res); 2346 2347 /* add "..." if past the "end" of the buffer */ 2348 if (bp - buf > SUM_COMPND_MAX) { 2349 strcpy(buf + SUM_COMPND_MAX - strlen("..."), 2350 "..."); --- 54 unchanged lines hidden (view full) --- 2405} 2406 2407 2408static void 2409dtl_change_info(char *msg, change_info4 *infop) 2410{ 2411 sprintf(get_line(0, 0), "%s:", msg); 2412 sprintf(get_line(0, 0), " Atomic = %s", | 2340 bp += strlen(bp); 2341 2342 xdr_free(xdr_nfs_cb_resop4, (char *)&one_res); 2343 2344 /* add "..." if past the "end" of the buffer */ 2345 if (bp - buf > SUM_COMPND_MAX) { 2346 strcpy(buf + SUM_COMPND_MAX - strlen("..."), 2347 "..."); --- 54 unchanged lines hidden (view full) --- 2402} 2403 2404 2405static void 2406dtl_change_info(char *msg, change_info4 *infop) 2407{ 2408 sprintf(get_line(0, 0), "%s:", msg); 2409 sprintf(get_line(0, 0), " Atomic = %s", |
2413 infop->atomic ? "TRUE" : "FALSE"); | 2410 infop->atomic ? "TRUE" : "FALSE"); |
2414 detail_fattr4_change(" Before", infop->before); 2415 detail_fattr4_change(" After", infop->after); 2416} 2417 2418static void 2419detail_fattr4_change(char *msg, fattr4_change chg) 2420{ 2421 sprintf(get_line(0, 0), "%s: 0x%llx", msg, chg); --- 9 unchanged lines hidden (view full) --- 2431} 2432 2433static void 2434dtl_nfsstat4(void *obj) 2435{ 2436 nfsstat4 status = *(nfsstat4 *)obj; 2437 2438 sprintf(get_line(0, 0), "Status = %d (%s)", status, | 2411 detail_fattr4_change(" Before", infop->before); 2412 detail_fattr4_change(" After", infop->after); 2413} 2414 2415static void 2416detail_fattr4_change(char *msg, fattr4_change chg) 2417{ 2418 sprintf(get_line(0, 0), "%s: 0x%llx", msg, chg); --- 9 unchanged lines hidden (view full) --- 2428} 2429 2430static void 2431dtl_nfsstat4(void *obj) 2432{ 2433 nfsstat4 status = *(nfsstat4 *)obj; 2434 2435 sprintf(get_line(0, 0), "Status = %d (%s)", status, |
2439 status_name(status)); | 2436 status_name(status)); |
2440} 2441 2442static void 2443sumres_access(char *buf, size_t buflen, void *obj) 2444{ 2445 ACCESS4res *res = (ACCESS4res *)obj; 2446 char *bp = buf; 2447 int len, blen = buflen; --- 22 unchanged lines hidden (view full) --- 2470static void 2471dtlres_access(void *obj) 2472{ 2473 ACCESS4res *res = (ACCESS4res *)obj; 2474 2475 dtl_nfsstat4(obj); 2476 if (res->status == NFS4_OK) { 2477 detail_access4("Supported Attributes", | 2437} 2438 2439static void 2440sumres_access(char *buf, size_t buflen, void *obj) 2441{ 2442 ACCESS4res *res = (ACCESS4res *)obj; 2443 char *bp = buf; 2444 int len, blen = buflen; --- 22 unchanged lines hidden (view full) --- 2467static void 2468dtlres_access(void *obj) 2469{ 2470 ACCESS4res *res = (ACCESS4res *)obj; 2471 2472 dtl_nfsstat4(obj); 2473 if (res->status == NFS4_OK) { 2474 detail_access4("Supported Attributes", |
2478 res->ACCESS4res_u.resok4.supported); | 2475 res->ACCESS4res_u.resok4.supported); |
2479 detail_access4("Allowed Attributes", | 2476 detail_access4("Allowed Attributes", |
2480 res->ACCESS4res_u.resok4.access); | 2477 res->ACCESS4res_u.resok4.access); |
2481 } 2482} 2483 2484static void 2485sumres_close(char *buf, size_t buflen, void *obj) 2486{ 2487 CLOSE4res *res = (CLOSE4res *)obj; 2488 2489 if (res->status == NFS4_OK) 2490 snprintf(buf, buflen, "%s", | 2478 } 2479} 2480 2481static void 2482sumres_close(char *buf, size_t buflen, void *obj) 2483{ 2484 CLOSE4res *res = (CLOSE4res *)obj; 2485 2486 if (res->status == NFS4_OK) 2487 snprintf(buf, buflen, "%s", |
2491 sum_open_stateid(&res->CLOSE4res_u.open_stateid)); | 2488 sum_open_stateid(&res->CLOSE4res_u.open_stateid)); |
2492} 2493 2494static void 2495dtlres_close(void *obj) 2496{ 2497 CLOSE4res *res = (CLOSE4res *)obj; 2498 2499 dtl_nfsstat4(obj); --- 4 unchanged lines hidden (view full) --- 2504 2505static void 2506sumres_commit(char *buf, size_t buflen, void *obj) 2507{ 2508 COMMIT4res *res = (COMMIT4res *)obj; 2509 2510 if (res->status == NFS4_OK) 2511 snprintf(buf, buflen, "Verf=%s", | 2489} 2490 2491static void 2492dtlres_close(void *obj) 2493{ 2494 CLOSE4res *res = (CLOSE4res *)obj; 2495 2496 dtl_nfsstat4(obj); --- 4 unchanged lines hidden (view full) --- 2501 2502static void 2503sumres_commit(char *buf, size_t buflen, void *obj) 2504{ 2505 COMMIT4res *res = (COMMIT4res *)obj; 2506 2507 if (res->status == NFS4_OK) 2508 snprintf(buf, buflen, "Verf=%s", |
2512 tohex(res->COMMIT4res_u.resok4.writeverf, 2513 NFS4_VERIFIER_SIZE)); | 2509 tohex(res->COMMIT4res_u.resok4.writeverf, 2510 NFS4_VERIFIER_SIZE)); |
2514} 2515 2516static void 2517dtlres_commit(void *obj) 2518{ 2519 COMMIT4res *res = (COMMIT4res *)obj; 2520 2521 dtl_nfsstat4(obj); 2522 if (res->status == NFS4_OK) { 2523 sprintf(get_line(0, 0), "Verifier = %s", | 2511} 2512 2513static void 2514dtlres_commit(void *obj) 2515{ 2516 COMMIT4res *res = (COMMIT4res *)obj; 2517 2518 dtl_nfsstat4(obj); 2519 if (res->status == NFS4_OK) { 2520 sprintf(get_line(0, 0), "Verifier = %s", |
2524 tohex(res->COMMIT4res_u.resok4.writeverf, 2525 NFS4_VERIFIER_SIZE)); | 2521 tohex(res->COMMIT4res_u.resok4.writeverf, 2522 NFS4_VERIFIER_SIZE)); |
2526 } 2527} 2528 2529static void 2530dtlres_create(void *obj) 2531{ 2532 CREATE4res *res = (CREATE4res *)obj; 2533 2534 dtl_nfsstat4(obj); 2535 if (res->status == NFS4_OK) { 2536 dtl_change_info("Change Information", | 2523 } 2524} 2525 2526static void 2527dtlres_create(void *obj) 2528{ 2529 CREATE4res *res = (CREATE4res *)obj; 2530 2531 dtl_nfsstat4(obj); 2532 if (res->status == NFS4_OK) { 2533 dtl_change_info("Change Information", |
2537 &res->CREATE4res_u.resok4.cinfo); | 2534 &res->CREATE4res_u.resok4.cinfo); |
2538 detail_attr_bitmap("", &res->CREATE4res_u.resok4.attrset, | 2535 detail_attr_bitmap("", &res->CREATE4res_u.resok4.attrset, |
2539 NULL); | 2536 NULL); |
2540 } 2541} 2542 2543static void 2544sumres_getattr(char *buf, size_t buflen, void *obj) 2545{ 2546 GETATTR4res *res = (GETATTR4res *)obj; 2547 --- 36 unchanged lines hidden (view full) --- 2584{ 2585 char *bp; 2586 GETFH4res *res = (GETFH4res *)obj; 2587 2588 strncpy(buf, status_name(res->status), buflen); 2589 if (res->status == NFS4_OK) { 2590 bp = buf + strlen(buf); 2591 snprintf(bp, buflen - (bp - buf), " %s", | 2537 } 2538} 2539 2540static void 2541sumres_getattr(char *buf, size_t buflen, void *obj) 2542{ 2543 GETATTR4res *res = (GETATTR4res *)obj; 2544 --- 36 unchanged lines hidden (view full) --- 2581{ 2582 char *bp; 2583 GETFH4res *res = (GETFH4res *)obj; 2584 2585 strncpy(buf, status_name(res->status), buflen); 2586 if (res->status == NFS4_OK) { 2587 bp = buf + strlen(buf); 2588 snprintf(bp, buflen - (bp - buf), " %s", |
2592 sum_fh4(&res->GETFH4res_u.resok4.object)); | 2589 sum_fh4(&res->GETFH4res_u.resok4.object)); |
2593 } 2594} 2595 2596static void 2597dtlres_getfh(void *obj) 2598{ 2599 GETFH4res *res = (GETFH4res *)obj; 2600 --- 6 unchanged lines hidden (view full) --- 2607static void 2608dtlres_link(void *obj) 2609{ 2610 LINK4res *res = (LINK4res *)obj; 2611 2612 dtl_nfsstat4(obj); 2613 if (res->status == NFS4_OK) { 2614 dtl_change_info("Change Information", | 2590 } 2591} 2592 2593static void 2594dtlres_getfh(void *obj) 2595{ 2596 GETFH4res *res = (GETFH4res *)obj; 2597 --- 6 unchanged lines hidden (view full) --- 2604static void 2605dtlres_link(void *obj) 2606{ 2607 LINK4res *res = (LINK4res *)obj; 2608 2609 dtl_nfsstat4(obj); 2610 if (res->status == NFS4_OK) { 2611 dtl_change_info("Change Information", |
2615 &res->LINK4res_u.resok4.cinfo); | 2612 &res->LINK4res_u.resok4.cinfo); |
2616 } 2617} 2618 2619static void 2620sumres_lock(char *buf, size_t buflen, void *obj) 2621{ 2622 char *bp; 2623 LOCK4res *res = (LOCK4res *)obj; 2624 2625 strncpy(buf, status_name(res->status), buflen); 2626 if (res->status == NFS4_OK) { 2627 bp = buf + strlen(buf); 2628 snprintf(bp, buflen - (bp - buf), " %s", | 2613 } 2614} 2615 2616static void 2617sumres_lock(char *buf, size_t buflen, void *obj) 2618{ 2619 char *bp; 2620 LOCK4res *res = (LOCK4res *)obj; 2621 2622 strncpy(buf, status_name(res->status), buflen); 2623 if (res->status == NFS4_OK) { 2624 bp = buf + strlen(buf); 2625 snprintf(bp, buflen - (bp - buf), " %s", |
2629 sum_lock_stateid(&res->LOCK4res_u.resok4.lock_stateid)); | 2626 sum_lock_stateid(&res->LOCK4res_u.resok4.lock_stateid)); |
2630 } 2631 if (res->status == NFS4ERR_DENIED) { 2632 bp = buf + strlen(buf); 2633 snprintf(bp, buflen - (bp - buf), " %s", | 2627 } 2628 if (res->status == NFS4ERR_DENIED) { 2629 bp = buf + strlen(buf); 2630 snprintf(bp, buflen - (bp - buf), " %s", |
2634 sum_lock_denied(&res->LOCK4res_u.denied)); | 2631 sum_lock_denied(&res->LOCK4res_u.denied)); |
2635 } 2636} 2637 2638static void 2639dtlres_lock(void *obj) 2640{ 2641 LOCK4res *res = (LOCK4res *)obj; 2642 --- 11 unchanged lines hidden (view full) --- 2654{ 2655 char *bp; 2656 LOCKT4res *res = (LOCKT4res *)obj; 2657 2658 strcpy(buf, status_name(res->status)); 2659 if (res->status == NFS4ERR_DENIED) { 2660 bp = buf + strlen(buf); 2661 snprintf(bp, buflen - (bp - buf), " %s", | 2632 } 2633} 2634 2635static void 2636dtlres_lock(void *obj) 2637{ 2638 LOCK4res *res = (LOCK4res *)obj; 2639 --- 11 unchanged lines hidden (view full) --- 2651{ 2652 char *bp; 2653 LOCKT4res *res = (LOCKT4res *)obj; 2654 2655 strcpy(buf, status_name(res->status)); 2656 if (res->status == NFS4ERR_DENIED) { 2657 bp = buf + strlen(buf); 2658 snprintf(bp, buflen - (bp - buf), " %s", |
2662 sum_lock_denied(&res->LOCKT4res_u.denied)); | 2659 sum_lock_denied(&res->LOCKT4res_u.denied)); |
2663 } 2664} 2665 2666static void 2667dtlres_lockt(void *obj) 2668{ 2669 LOCKT4res *res = (LOCKT4res *)obj; 2670 --- 8 unchanged lines hidden (view full) --- 2679{ 2680 char *bp; 2681 LOCKU4res *res = (LOCKU4res *)obj; 2682 2683 strncpy(buf, status_name(res->status), buflen); 2684 bp = buf + strlen(buf); 2685 if (res->status == NFS4_OK) 2686 snprintf(bp, buflen - (bp - buf), " %s", | 2660 } 2661} 2662 2663static void 2664dtlres_lockt(void *obj) 2665{ 2666 LOCKT4res *res = (LOCKT4res *)obj; 2667 --- 8 unchanged lines hidden (view full) --- 2676{ 2677 char *bp; 2678 LOCKU4res *res = (LOCKU4res *)obj; 2679 2680 strncpy(buf, status_name(res->status), buflen); 2681 bp = buf + strlen(buf); 2682 if (res->status == NFS4_OK) 2683 snprintf(bp, buflen - (bp - buf), " %s", |
2687 sum_lock_stateid(&res->LOCKU4res_u.lock_stateid)); | 2684 sum_lock_stateid(&res->LOCKU4res_u.lock_stateid)); |
2688} 2689 2690static void 2691dtlres_locku(void *obj) 2692{ 2693 LOCKU4res *res = (LOCKU4res *)obj; 2694 2695 dtl_nfsstat4(obj); --- 11 unchanged lines hidden (view full) --- 2707 2708 strncpy(bp, status_name(res->status), blen); 2709 2710 if (res->status == NFS4_OK) { 2711 bp += (len = strlen(bp)); 2712 blen -= len; 2713 2714 snprintf(bp, blen, " %s", | 2685} 2686 2687static void 2688dtlres_locku(void *obj) 2689{ 2690 LOCKU4res *res = (LOCKU4res *)obj; 2691 2692 dtl_nfsstat4(obj); --- 11 unchanged lines hidden (view full) --- 2704 2705 strncpy(bp, status_name(res->status), blen); 2706 2707 if (res->status == NFS4_OK) { 2708 bp += (len = strlen(bp)); 2709 blen -= len; 2710 2711 snprintf(bp, blen, " %s", |
2715 sum_stateid(&res->OPEN4res_u.resok4.stateid)); | 2712 sum_stateid(&res->OPEN4res_u.resok4.stateid)); |
2716 bp += (len = strlen(bp)); 2717 blen -= len; 2718 2719 if ((rflags = res->OPEN4res_u.resok4.rflags) != 0) { 2720 snprintf(bp, blen, "%s", sum_open_rflags(rflags)); 2721 bp += (len = strlen(bp)); 2722 blen -= len; 2723 } --- 6 unchanged lines hidden (view full) --- 2730dtlres_open(void *obj) 2731{ 2732 OPEN4res *res = (OPEN4res *)obj; 2733 2734 dtl_nfsstat4(obj); 2735 if (res->status == NFS4_OK) { 2736 detail_stateid(&res->OPEN4res_u.resok4.stateid); 2737 dtl_change_info("Change Information", | 2713 bp += (len = strlen(bp)); 2714 blen -= len; 2715 2716 if ((rflags = res->OPEN4res_u.resok4.rflags) != 0) { 2717 snprintf(bp, blen, "%s", sum_open_rflags(rflags)); 2718 bp += (len = strlen(bp)); 2719 blen -= len; 2720 } --- 6 unchanged lines hidden (view full) --- 2727dtlres_open(void *obj) 2728{ 2729 OPEN4res *res = (OPEN4res *)obj; 2730 2731 dtl_nfsstat4(obj); 2732 if (res->status == NFS4_OK) { 2733 detail_stateid(&res->OPEN4res_u.resok4.stateid); 2734 dtl_change_info("Change Information", |
2738 &res->OPEN4res_u.resok4.cinfo); | 2735 &res->OPEN4res_u.resok4.cinfo); |
2739 sprintf(get_line(0, 0), "Flags = 0x%x (%s)", | 2736 sprintf(get_line(0, 0), "Flags = 0x%x (%s)", |
2740 res->OPEN4res_u.resok4.rflags, 2741 detail_open_rflags(res->OPEN4res_u.resok4.rflags)); | 2737 res->OPEN4res_u.resok4.rflags, 2738 detail_open_rflags(res->OPEN4res_u.resok4.rflags)); |
2742 detail_attr_bitmap("", &res->OPEN4res_u.resok4.attrset, | 2739 detail_attr_bitmap("", &res->OPEN4res_u.resok4.attrset, |
2743 NULL); | 2740 NULL); |
2744 detail_delegation(&res->OPEN4res_u.resok4.delegation); 2745 } 2746} 2747 2748static void 2749sumres_open_confirm(char *buf, size_t buflen, void *obj) 2750{ 2751 char *bp; 2752 OPEN_CONFIRM4res *res = (OPEN_CONFIRM4res *)obj; 2753 2754 strncpy(buf, status_name(res->status), buflen); 2755 if (res->status == NFS4_OK) { 2756 bp = buf + strlen(buf); 2757 snprintf(bp, buflen - (bp - buf), " %s", | 2741 detail_delegation(&res->OPEN4res_u.resok4.delegation); 2742 } 2743} 2744 2745static void 2746sumres_open_confirm(char *buf, size_t buflen, void *obj) 2747{ 2748 char *bp; 2749 OPEN_CONFIRM4res *res = (OPEN_CONFIRM4res *)obj; 2750 2751 strncpy(buf, status_name(res->status), buflen); 2752 if (res->status == NFS4_OK) { 2753 bp = buf + strlen(buf); 2754 snprintf(bp, buflen - (bp - buf), " %s", |
2758 sum_open_stateid(&res->OPEN_CONFIRM4res_u.resok4. 2759 open_stateid)); | 2755 sum_open_stateid(&res->OPEN_CONFIRM4res_u.resok4. 2756 open_stateid)); |
2760 } 2761} 2762 2763static void 2764dtlres_open_confirm(void *obj) 2765{ 2766 OPEN_CONFIRM4res *res = (OPEN_CONFIRM4res *)obj; 2767 2768 dtl_nfsstat4(obj); 2769 if (res->status == NFS4_OK) { 2770 detail_open_stateid(&res->OPEN_CONFIRM4res_u.resok4. | 2757 } 2758} 2759 2760static void 2761dtlres_open_confirm(void *obj) 2762{ 2763 OPEN_CONFIRM4res *res = (OPEN_CONFIRM4res *)obj; 2764 2765 dtl_nfsstat4(obj); 2766 if (res->status == NFS4_OK) { 2767 detail_open_stateid(&res->OPEN_CONFIRM4res_u.resok4. |
2771 open_stateid); | 2768 open_stateid); |
2772 } 2773} 2774 2775static void 2776sumres_open_downgrd(char *buf, size_t buflen, void *obj) 2777{ 2778 char *bp; 2779 OPEN_DOWNGRADE4res *res = (OPEN_DOWNGRADE4res *)obj; 2780 2781 strncpy(buf, status_name(res->status), buflen); 2782 if (res->status == NFS4_OK) { 2783 bp = buf + strlen(buf); 2784 snprintf(bp, buflen - (bp - buf), " %s", | 2769 } 2770} 2771 2772static void 2773sumres_open_downgrd(char *buf, size_t buflen, void *obj) 2774{ 2775 char *bp; 2776 OPEN_DOWNGRADE4res *res = (OPEN_DOWNGRADE4res *)obj; 2777 2778 strncpy(buf, status_name(res->status), buflen); 2779 if (res->status == NFS4_OK) { 2780 bp = buf + strlen(buf); 2781 snprintf(bp, buflen - (bp - buf), " %s", |
2785 sum_open_stateid(&res->OPEN_DOWNGRADE4res_u.resok4. 2786 open_stateid)); | 2782 sum_open_stateid(&res->OPEN_DOWNGRADE4res_u.resok4. 2783 open_stateid)); |
2787 } 2788} 2789 2790static void 2791dtlres_open_downgrd(void *obj) 2792{ 2793 OPEN_DOWNGRADE4res *res = (OPEN_DOWNGRADE4res *)obj; 2794 2795 dtl_nfsstat4(obj); 2796 if (res->status == NFS4_OK) { 2797 detail_open_stateid(&res->OPEN_DOWNGRADE4res_u.resok4. | 2784 } 2785} 2786 2787static void 2788dtlres_open_downgrd(void *obj) 2789{ 2790 OPEN_DOWNGRADE4res *res = (OPEN_DOWNGRADE4res *)obj; 2791 2792 dtl_nfsstat4(obj); 2793 if (res->status == NFS4_OK) { 2794 detail_open_stateid(&res->OPEN_DOWNGRADE4res_u.resok4. |
2798 open_stateid); | 2795 open_stateid); |
2799 } 2800} 2801 2802static void 2803sumres_read(char *buf, size_t buflen, void *obj) 2804{ 2805 char *bp; 2806 READ4res *res = (READ4res *)obj; 2807 2808 strncpy(buf, status_name(res->status), buflen); 2809 if (res->status == NFS4_OK) { 2810 bp = buf + strlen(buf); 2811 snprintf(bp, buflen - (bp - buf), " (%u bytes) %s", | 2796 } 2797} 2798 2799static void 2800sumres_read(char *buf, size_t buflen, void *obj) 2801{ 2802 char *bp; 2803 READ4res *res = (READ4res *)obj; 2804 2805 strncpy(buf, status_name(res->status), buflen); 2806 if (res->status == NFS4_OK) { 2807 bp = buf + strlen(buf); 2808 snprintf(bp, buflen - (bp - buf), " (%u bytes) %s", |
2812 res->READ4res_u.resok4.data.data_len, 2813 res->READ4res_u.resok4.eof ? "EOF" : ""); | 2809 res->READ4res_u.resok4.data.data_len, 2810 res->READ4res_u.resok4.eof ? "EOF" : ""); |
2814 } 2815} 2816 2817static void 2818dtlres_read(void *obj) 2819{ 2820 READ4res *res = (READ4res *)obj; 2821 2822 dtl_nfsstat4(obj); 2823 if (res->status == NFS4_OK) { 2824 sprintf(get_line(0, 0), "Count = %u bytes read", | 2811 } 2812} 2813 2814static void 2815dtlres_read(void *obj) 2816{ 2817 READ4res *res = (READ4res *)obj; 2818 2819 dtl_nfsstat4(obj); 2820 if (res->status == NFS4_OK) { 2821 sprintf(get_line(0, 0), "Count = %u bytes read", |
2825 res->READ4res_u.resok4.data.data_len); | 2822 res->READ4res_u.resok4.data.data_len); |
2826 sprintf(get_line(0, 0), "End of file = %s", | 2823 sprintf(get_line(0, 0), "End of file = %s", |
2827 res->READ4res_u.resok4.eof ? "TRUE" : "FALSE"); | 2824 res->READ4res_u.resok4.eof ? "TRUE" : "FALSE"); |
2828 } 2829} 2830 2831static void 2832sumres_readdir(char *buf, size_t buflen, void *obj) 2833{ 2834 char *bp; 2835 READDIR4res *res = (READDIR4res *)obj; 2836 int num_entries = 0; 2837 entry4 *ep; 2838 2839 strncpy(buf, status_name(res->status), buflen); 2840 if (res->status == NFS4_OK) { 2841 for (ep = res->READDIR4res_u.resok4.reply.entries; 2842 ep != NULL; 2843 ep = ep->nextentry) 2844 num_entries++; 2845 bp = buf + strlen(buf); 2846 snprintf(bp, buflen - (bp - buf), " %d entries (%s)", | 2825 } 2826} 2827 2828static void 2829sumres_readdir(char *buf, size_t buflen, void *obj) 2830{ 2831 char *bp; 2832 READDIR4res *res = (READDIR4res *)obj; 2833 int num_entries = 0; 2834 entry4 *ep; 2835 2836 strncpy(buf, status_name(res->status), buflen); 2837 if (res->status == NFS4_OK) { 2838 for (ep = res->READDIR4res_u.resok4.reply.entries; 2839 ep != NULL; 2840 ep = ep->nextentry) 2841 num_entries++; 2842 bp = buf + strlen(buf); 2843 snprintf(bp, buflen - (bp - buf), " %d entries (%s)", |
2847 num_entries, 2848 res->READDIR4res_u.resok4.reply.eof 2849 ? "No more" : "More"); | 2844 num_entries, 2845 res->READDIR4res_u.resok4.reply.eof 2846 ? "No more" : "More"); |
2850 } 2851} 2852 2853static void 2854dtlres_readdir(void *obj) 2855{ 2856 READDIR4res *res = (READDIR4res *)obj; 2857 int num_entries = 0; 2858 entry4 *ep; 2859 2860 dtl_nfsstat4(obj); 2861 if (res->status == NFS4_OK) { 2862 for (ep = res->READDIR4res_u.resok4.reply.entries; 2863 ep != NULL; 2864 ep = ep->nextentry) { 2865 num_entries++; 2866 sprintf(get_line(0, 0), | 2847 } 2848} 2849 2850static void 2851dtlres_readdir(void *obj) 2852{ 2853 READDIR4res *res = (READDIR4res *)obj; 2854 int num_entries = 0; 2855 entry4 *ep; 2856 2857 dtl_nfsstat4(obj); 2858 if (res->status == NFS4_OK) { 2859 for (ep = res->READDIR4res_u.resok4.reply.entries; 2860 ep != NULL; 2861 ep = ep->nextentry) { 2862 num_entries++; 2863 sprintf(get_line(0, 0), |
2867 "------------------ entry #%d", 2868 num_entries); | 2864 "------------------ entry #%d", 2865 num_entries); |
2869 sprintf(get_line(0, 0), "Cookie = %llu", | 2866 sprintf(get_line(0, 0), "Cookie = %llu", |
2870 ep->cookie); | 2867 ep->cookie); |
2871 sprintf(get_line(0, 0), "Name = %s", | 2868 sprintf(get_line(0, 0), "Name = %s", |
2872 component_name(&ep->name)); | 2869 component_name(&ep->name)); |
2873 detail_fattr4(&ep->attrs); 2874 } 2875 if (num_entries == 0) 2876 sprintf(get_line(0, 0), "(No entries)"); 2877 sprintf(get_line(0, 0), "EOF = %s", 2878 res->READDIR4res_u.resok4.reply.eof ? "TRUE" : "FALSE"); 2879 sprintf(get_line(0, 0), "Verifer = %s", | 2870 detail_fattr4(&ep->attrs); 2871 } 2872 if (num_entries == 0) 2873 sprintf(get_line(0, 0), "(No entries)"); 2874 sprintf(get_line(0, 0), "EOF = %s", 2875 res->READDIR4res_u.resok4.reply.eof ? "TRUE" : "FALSE"); 2876 sprintf(get_line(0, 0), "Verifer = %s", |
2880 tohex(res->READDIR4res_u.resok4.cookieverf, 2881 NFS4_VERIFIER_SIZE)); | 2877 tohex(res->READDIR4res_u.resok4.cookieverf, 2878 NFS4_VERIFIER_SIZE)); |
2882 } 2883} 2884 2885static void 2886sumres_readlnk(char *buf, size_t buflen, void *obj) 2887{ 2888 char *bp; 2889 READLINK4res *res = (READLINK4res *)obj; 2890 2891 strncpy(buf, status_name(res->status), buflen); 2892 if (res->status == NFS4_OK) { 2893 bp = buf + strlen(buf); 2894 snprintf(bp, buflen - (bp - buf), " %s", | 2879 } 2880} 2881 2882static void 2883sumres_readlnk(char *buf, size_t buflen, void *obj) 2884{ 2885 char *bp; 2886 READLINK4res *res = (READLINK4res *)obj; 2887 2888 strncpy(buf, status_name(res->status), buflen); 2889 if (res->status == NFS4_OK) { 2890 bp = buf + strlen(buf); 2891 snprintf(bp, buflen - (bp - buf), " %s", |
2895 linktext_name(&res->READLINK4res_u.resok4.link)); | 2892 linktext_name(&res->READLINK4res_u.resok4.link)); |
2896 } 2897} 2898 2899static void 2900dtlres_readlnk(void *obj) 2901{ 2902 READLINK4res *res = (READLINK4res *)obj; 2903 2904 dtl_nfsstat4(obj); 2905 if (res->status == NFS4_OK) { 2906 sprintf(get_line(0, 0), "Link = %s", | 2893 } 2894} 2895 2896static void 2897dtlres_readlnk(void *obj) 2898{ 2899 READLINK4res *res = (READLINK4res *)obj; 2900 2901 dtl_nfsstat4(obj); 2902 if (res->status == NFS4_OK) { 2903 sprintf(get_line(0, 0), "Link = %s", |
2907 linktext_name(&res->READLINK4res_u.resok4.link)); | 2904 linktext_name(&res->READLINK4res_u.resok4.link)); |
2908 } 2909} 2910 2911static void 2912dtlres_remove(void *obj) 2913{ 2914 REMOVE4res *res = (REMOVE4res *)obj; 2915 2916 dtl_nfsstat4(obj); 2917 if (res->status == NFS4_OK) { 2918 dtl_change_info("Change Information", | 2905 } 2906} 2907 2908static void 2909dtlres_remove(void *obj) 2910{ 2911 REMOVE4res *res = (REMOVE4res *)obj; 2912 2913 dtl_nfsstat4(obj); 2914 if (res->status == NFS4_OK) { 2915 dtl_change_info("Change Information", |
2919 &res->REMOVE4res_u.resok4.cinfo); | 2916 &res->REMOVE4res_u.resok4.cinfo); |
2920 } 2921} 2922 2923static void 2924dtlres_rename(void *obj) 2925{ 2926 RENAME4res *res = (RENAME4res *)obj; 2927 2928 dtl_nfsstat4(obj); 2929 if (res->status == NFS4_OK) { 2930 dtl_change_info("Source Change Information", | 2917 } 2918} 2919 2920static void 2921dtlres_rename(void *obj) 2922{ 2923 RENAME4res *res = (RENAME4res *)obj; 2924 2925 dtl_nfsstat4(obj); 2926 if (res->status == NFS4_OK) { 2927 dtl_change_info("Source Change Information", |
2931 &res->RENAME4res_u.resok4.source_cinfo); | 2928 &res->RENAME4res_u.resok4.source_cinfo); |
2932 dtl_change_info("Target Change Information", | 2929 dtl_change_info("Target Change Information", |
2933 &res->RENAME4res_u.resok4.target_cinfo); | 2930 &res->RENAME4res_u.resok4.target_cinfo); |
2934 } 2935} 2936 2937static void 2938sumres_secinfo(char *buf, size_t buflen, void *obj) 2939{ 2940 char *bp; 2941 SECINFO4res *res = (SECINFO4res *)obj; 2942 2943 strncpy(buf, status_name(res->status), buflen); 2944 bp = buf + strlen(buf); 2945 if (res->status == NFS4_OK) { 2946 uint_t numinfo = res->SECINFO4res_u.resok4.SECINFO4resok_len; 2947 secinfo4 *infop; 2948 2949 for (infop = res->SECINFO4res_u.resok4.SECINFO4resok_val; 2950 numinfo != 0; 2951 infop++, numinfo--) { 2952 snprintf(bp, buflen - (bp - buf), " %s", | 2931 } 2932} 2933 2934static void 2935sumres_secinfo(char *buf, size_t buflen, void *obj) 2936{ 2937 char *bp; 2938 SECINFO4res *res = (SECINFO4res *)obj; 2939 2940 strncpy(buf, status_name(res->status), buflen); 2941 bp = buf + strlen(buf); 2942 if (res->status == NFS4_OK) { 2943 uint_t numinfo = res->SECINFO4res_u.resok4.SECINFO4resok_len; 2944 secinfo4 *infop; 2945 2946 for (infop = res->SECINFO4res_u.resok4.SECINFO4resok_val; 2947 numinfo != 0; 2948 infop++, numinfo--) { 2949 snprintf(bp, buflen - (bp - buf), " %s", |
2953 flavor_name(infop->flavor)); | 2950 flavor_name(infop->flavor)); |
2954 bp += strlen(bp); 2955 } 2956 } 2957} 2958 2959static void 2960dtlres_secinfo(void *obj) 2961{ 2962 SECINFO4res *res = (SECINFO4res *)obj; 2963 2964 dtl_nfsstat4(obj); 2965 if (res->status == NFS4_OK) { 2966 uint_t numinfo = | 2951 bp += strlen(bp); 2952 } 2953 } 2954} 2955 2956static void 2957dtlres_secinfo(void *obj) 2958{ 2959 SECINFO4res *res = (SECINFO4res *)obj; 2960 2961 dtl_nfsstat4(obj); 2962 if (res->status == NFS4_OK) { 2963 uint_t numinfo = |
2967 res->SECINFO4res_u.resok4.SECINFO4resok_len; | 2964 res->SECINFO4res_u.resok4.SECINFO4resok_len; |
2968 secinfo4 *infop; 2969 2970 for (infop = res->SECINFO4res_u.resok4.SECINFO4resok_val; 2971 numinfo != 0; 2972 infop++, numinfo--) { 2973 detail_secinfo4(infop); 2974 } 2975 } --- 23 unchanged lines hidden (view full) --- 2999 char *bp; 3000 SETCLIENTID4res *res = (SETCLIENTID4res *)obj; 3001 3002 strncpy(buf, status_name(res->status), buflen); 3003 switch (res->status) { 3004 case NFS_OK: 3005 bp = buf + strlen(buf); 3006 snprintf(bp, buflen - (bp - buf), " %s CFV=%s", | 2965 secinfo4 *infop; 2966 2967 for (infop = res->SECINFO4res_u.resok4.SECINFO4resok_val; 2968 numinfo != 0; 2969 infop++, numinfo--) { 2970 detail_secinfo4(infop); 2971 } 2972 } --- 23 unchanged lines hidden (view full) --- 2996 char *bp; 2997 SETCLIENTID4res *res = (SETCLIENTID4res *)obj; 2998 2999 strncpy(buf, status_name(res->status), buflen); 3000 switch (res->status) { 3001 case NFS_OK: 3002 bp = buf + strlen(buf); 3003 snprintf(bp, buflen - (bp - buf), " %s CFV=%s", |
3007 sum_clientid(res->SETCLIENTID4res_u.resok4.clientid), 3008 tohex(res->SETCLIENTID4res_u.resok4.setclientid_confirm, 3009 NFS4_VERIFIER_SIZE)); | 3004 sum_clientid(res->SETCLIENTID4res_u.resok4.clientid), 3005 tohex(res->SETCLIENTID4res_u.resok4.setclientid_confirm, 3006 NFS4_VERIFIER_SIZE)); |
3010 break; 3011 case NFS4ERR_CLID_INUSE: 3012 bp = buf + strlen(buf); 3013 snprintf(bp, buflen - (bp - buf), " ID=%s Addr=%s", | 3007 break; 3008 case NFS4ERR_CLID_INUSE: 3009 bp = buf + strlen(buf); 3010 snprintf(bp, buflen - (bp - buf), " ID=%s Addr=%s", |
3014 res->SETCLIENTID4res_u.client_using.r_netid, 3015 res->SETCLIENTID4res_u.client_using.r_addr); | 3011 res->SETCLIENTID4res_u.client_using.r_netid, 3012 res->SETCLIENTID4res_u.client_using.r_addr); |
3016 break; 3017 } 3018} 3019 3020static void 3021dtlres_setclid(void *obj) 3022{ 3023 SETCLIENTID4res *res = (SETCLIENTID4res *)obj; 3024 3025 dtl_nfsstat4(obj); 3026 switch (res->status) { 3027 case NFS_OK: 3028 detail_clientid(res->SETCLIENTID4res_u.resok4.clientid); 3029 sprintf(get_line(0, 0), "Set Client ID Confirm Verifier = %s", | 3013 break; 3014 } 3015} 3016 3017static void 3018dtlres_setclid(void *obj) 3019{ 3020 SETCLIENTID4res *res = (SETCLIENTID4res *)obj; 3021 3022 dtl_nfsstat4(obj); 3023 switch (res->status) { 3024 case NFS_OK: 3025 detail_clientid(res->SETCLIENTID4res_u.resok4.clientid); 3026 sprintf(get_line(0, 0), "Set Client ID Confirm Verifier = %s", |
3030 tohex(res->SETCLIENTID4res_u.resok4.setclientid_confirm, 3031 NFS4_VERIFIER_SIZE)); | 3027 tohex(res->SETCLIENTID4res_u.resok4.setclientid_confirm, 3028 NFS4_VERIFIER_SIZE)); |
3032 break; 3033 case NFS4ERR_CLID_INUSE: 3034 sprintf(get_line(0, 0), "Used by Net ID = %s", | 3029 break; 3030 case NFS4ERR_CLID_INUSE: 3031 sprintf(get_line(0, 0), "Used by Net ID = %s", |
3035 res->SETCLIENTID4res_u.client_using.r_netid); | 3032 res->SETCLIENTID4res_u.client_using.r_netid); |
3036 sprintf(get_line(0, 0), "Used by Addr = %s", | 3033 sprintf(get_line(0, 0), "Used by Addr = %s", |
3037 res->SETCLIENTID4res_u.client_using.r_addr); | 3034 res->SETCLIENTID4res_u.client_using.r_addr); |
3038 break; 3039 } 3040} 3041 3042static void 3043sumres_write(char *buf, size_t buflen, void *obj) 3044{ 3045 char *bp; 3046 WRITE4res *res = (WRITE4res *)obj; 3047 3048 strncpy(buf, status_name(res->status), buflen); 3049 if (res->status == NFS4_OK) { 3050 bp = buf + strlen(buf); 3051 snprintf(bp, buflen - (bp - buf), " %u (%s)", | 3035 break; 3036 } 3037} 3038 3039static void 3040sumres_write(char *buf, size_t buflen, void *obj) 3041{ 3042 char *bp; 3043 WRITE4res *res = (WRITE4res *)obj; 3044 3045 strncpy(buf, status_name(res->status), buflen); 3046 if (res->status == NFS4_OK) { 3047 bp = buf + strlen(buf); 3048 snprintf(bp, buflen - (bp - buf), " %u (%s)", |
3052 res->WRITE4res_u.resok4.count, 3053 stable_how4_name(res->WRITE4res_u.resok4.committed)); | 3049 res->WRITE4res_u.resok4.count, 3050 stable_how4_name(res->WRITE4res_u.resok4.committed)); |
3054 } 3055} 3056 3057static void 3058dtlres_write(void *obj) 3059{ 3060 WRITE4res *res = (WRITE4res *)obj; 3061 3062 dtl_nfsstat4(obj); 3063 if (res->status == NFS4_OK) { 3064 sprintf(get_line(0, 0), "Count = %u bytes written", | 3051 } 3052} 3053 3054static void 3055dtlres_write(void *obj) 3056{ 3057 WRITE4res *res = (WRITE4res *)obj; 3058 3059 dtl_nfsstat4(obj); 3060 if (res->status == NFS4_OK) { 3061 sprintf(get_line(0, 0), "Count = %u bytes written", |
3065 res->WRITE4res_u.resok4.count); | 3062 res->WRITE4res_u.resok4.count); |
3066 sprintf(get_line(0, 0), "Stable = %s", | 3063 sprintf(get_line(0, 0), "Stable = %s", |
3067 stable_how4_name(res->WRITE4res_u.resok4.committed)); | 3064 stable_how4_name(res->WRITE4res_u.resok4.committed)); |
3068 sprintf(get_line(0, 0), "Verifier = %s", | 3065 sprintf(get_line(0, 0), "Verifier = %s", |
3069 tohex(res->WRITE4res_u.resok4.writeverf, 3070 NFS4_VERIFIER_SIZE)); | 3066 tohex(res->WRITE4res_u.resok4.writeverf, 3067 NFS4_VERIFIER_SIZE)); |
3071 } 3072} 3073 3074/* 3075 * Print details about the nfs_resop4 that is next in the XDR stream. 3076 */ 3077 3078static void 3079detail_nfs_resop4(void) 3080{ 3081 int numres; 3082 nfs_resop4 one_res; 3083 void (*fmtproc)(void *); 3084 3085 numres = getxdr_long(); 3086 (void) sprintf(get_line(0, 0), "Number of results = %d", | 3068 } 3069} 3070 3071/* 3072 * Print details about the nfs_resop4 that is next in the XDR stream. 3073 */ 3074 3075static void 3076detail_nfs_resop4(void) 3077{ 3078 int numres; 3079 nfs_resop4 one_res; 3080 void (*fmtproc)(void *); 3081 3082 numres = getxdr_long(); 3083 (void) sprintf(get_line(0, 0), "Number of results = %d", |
3087 numres); | 3084 numres); |
3088 3089 while (numres-- > 0) { 3090 bzero(&one_res, sizeof (one_res)); 3091 3092 if (!xdr_nfs_resop4(&xdrm, &one_res)) { 3093 xdr_free(xdr_nfs_resop4, (char *)&one_res); 3094 longjmp(xdr_err, 1); 3095 } 3096 3097 get_line(0, 0); /* blank line to separate ops */ 3098 sprintf(get_line(0, 0), "Op = %d (%s)", | 3085 3086 while (numres-- > 0) { 3087 bzero(&one_res, sizeof (one_res)); 3088 3089 if (!xdr_nfs_resop4(&xdrm, &one_res)) { 3090 xdr_free(xdr_nfs_resop4, (char *)&one_res); 3091 longjmp(xdr_err, 1); 3092 } 3093 3094 get_line(0, 0); /* blank line to separate ops */ 3095 sprintf(get_line(0, 0), "Op = %d (%s)", |
3099 one_res.resop, opcode_name(one_res.resop)); | 3096 one_res.resop, opcode_name(one_res.resop)); |
3100 if (one_res.resop < num_opcodes) 3101 fmtproc = opcode_info[one_res.resop].dtlres; 3102 else if (one_res.resop == OP_ILLEGAL) 3103 fmtproc = dtl_nfsstat4; 3104 else 3105 fmtproc = NULL; 3106 3107 if (fmtproc != NULL) --- 16 unchanged lines hidden (view full) --- 3124detail_cb_resop4(void) 3125{ 3126 int numres; 3127 nfs_cb_resop4 one_res; 3128 void (*fmtproc)(void *); 3129 3130 numres = getxdr_long(); 3131 (void) sprintf(get_line(0, 0), "Number of results = %d", | 3097 if (one_res.resop < num_opcodes) 3098 fmtproc = opcode_info[one_res.resop].dtlres; 3099 else if (one_res.resop == OP_ILLEGAL) 3100 fmtproc = dtl_nfsstat4; 3101 else 3102 fmtproc = NULL; 3103 3104 if (fmtproc != NULL) --- 16 unchanged lines hidden (view full) --- 3121detail_cb_resop4(void) 3122{ 3123 int numres; 3124 nfs_cb_resop4 one_res; 3125 void (*fmtproc)(void *); 3126 3127 numres = getxdr_long(); 3128 (void) sprintf(get_line(0, 0), "Number of results = %d", |
3132 numres); | 3129 numres); |
3133 3134 while (numres-- > 0) { 3135 bzero(&one_res, sizeof (one_res)); 3136 if (!xdr_nfs_cb_resop4(&xdrm, &one_res)) 3137 longjmp(xdr_err, 1); 3138 3139 get_line(0, 0); /* blank line to separate ops */ 3140 sprintf(get_line(0, 0), "Op = %d (%s)", | 3130 3131 while (numres-- > 0) { 3132 bzero(&one_res, sizeof (one_res)); 3133 if (!xdr_nfs_cb_resop4(&xdrm, &one_res)) 3134 longjmp(xdr_err, 1); 3135 3136 get_line(0, 0); /* blank line to separate ops */ 3137 sprintf(get_line(0, 0), "Op = %d (%s)", |
3141 one_res.resop, cb_opcode_name(one_res.resop)); | 3138 one_res.resop, cb_opcode_name(one_res.resop)); |
3142 if (one_res.resop < cb_num_opcodes) 3143 fmtproc = cb_opcode_info[one_res.resop].dtlres; 3144 else if (one_res.resop == OP_CB_ILLEGAL) 3145 fmtproc = dtl_nfsstat4; 3146 else 3147 fmtproc = NULL; 3148 3149 if (fmtproc != NULL) --- 101 unchanged lines hidden (view full) --- 3251 */ 3252 3253static void 3254detail_access4(char *descrip, uint32_t bits) 3255{ 3256 sprintf(get_line(0, 0), "%s = 0x%08x", descrip, bits); 3257 3258 (void) sprintf(get_line(0, 0), " %s", | 3139 if (one_res.resop < cb_num_opcodes) 3140 fmtproc = cb_opcode_info[one_res.resop].dtlres; 3141 else if (one_res.resop == OP_CB_ILLEGAL) 3142 fmtproc = dtl_nfsstat4; 3143 else 3144 fmtproc = NULL; 3145 3146 if (fmtproc != NULL) --- 101 unchanged lines hidden (view full) --- 3248 */ 3249 3250static void 3251detail_access4(char *descrip, uint32_t bits) 3252{ 3253 sprintf(get_line(0, 0), "%s = 0x%08x", descrip, bits); 3254 3255 (void) sprintf(get_line(0, 0), " %s", |
3259 getflag(bits, ACCESS4_READ, "Read", "(no read)")); | 3256 getflag(bits, ACCESS4_READ, "Read", "(no read)")); |
3260 (void) sprintf(get_line(0, 0), " %s", | 3257 (void) sprintf(get_line(0, 0), " %s", |
3261 getflag(bits, ACCESS4_LOOKUP, "Lookup", "(no lookup)")); | 3258 getflag(bits, ACCESS4_LOOKUP, "Lookup", "(no lookup)")); |
3262 (void) sprintf(get_line(0, 0), " %s", | 3259 (void) sprintf(get_line(0, 0), " %s", |
3263 getflag(bits, ACCESS4_MODIFY, "Modify", "(no modify)")); | 3260 getflag(bits, ACCESS4_MODIFY, "Modify", "(no modify)")); |
3264 (void) sprintf(get_line(0, 0), " %s", | 3261 (void) sprintf(get_line(0, 0), " %s", |
3265 getflag(bits, ACCESS4_EXTEND, "Extend", "(no extend)")); | 3262 getflag(bits, ACCESS4_EXTEND, "Extend", "(no extend)")); |
3266 (void) sprintf(get_line(0, 0), " %s", | 3263 (void) sprintf(get_line(0, 0), " %s", |
3267 getflag(bits, ACCESS4_DELETE, "Delete", "(no delete)")); | 3264 getflag(bits, ACCESS4_DELETE, "Delete", "(no delete)")); |
3268 (void) sprintf(get_line(0, 0), " %s", | 3265 (void) sprintf(get_line(0, 0), " %s", |
3269 getflag(bits, ACCESS4_EXECUTE, "Execute", "(no execute)")); | 3266 getflag(bits, ACCESS4_EXECUTE, "Execute", "(no execute)")); |
3270} 3271 3272 3273/* 3274 * Fill in a summary string for the given open_claim4. 3275 */ 3276static void 3277sum_name(char *buf, size_t buflen, open_claim4 *claim) 3278{ 3279 char *bp = buf; 3280 3281 switch (claim->claim) { 3282 case CLAIM_NULL: 3283 snprintf(bp, buflen, "%s ", | 3267} 3268 3269 3270/* 3271 * Fill in a summary string for the given open_claim4. 3272 */ 3273static void 3274sum_name(char *buf, size_t buflen, open_claim4 *claim) 3275{ 3276 char *bp = buf; 3277 3278 switch (claim->claim) { 3279 case CLAIM_NULL: 3280 snprintf(bp, buflen, "%s ", |
3284 component_name(&claim->open_claim4_u.file)); | 3281 component_name(&claim->open_claim4_u.file)); |
3285 break; 3286 case CLAIM_PREVIOUS: 3287 break; 3288 case CLAIM_DELEGATE_CUR: 3289 snprintf(bp, buflen, "%s ", | 3282 break; 3283 case CLAIM_PREVIOUS: 3284 break; 3285 case CLAIM_DELEGATE_CUR: 3286 snprintf(bp, buflen, "%s ", |
3290 component_name(&claim->open_claim4_u. 3291 delegate_cur_info.file)); | 3287 component_name(&claim->open_claim4_u. 3288 delegate_cur_info.file)); |
3292 break; 3293 case CLAIM_DELEGATE_PREV: 3294 snprintf(bp, buflen, "%s ", | 3289 break; 3290 case CLAIM_DELEGATE_PREV: 3291 snprintf(bp, buflen, "%s ", |
3295 component_name(&claim->open_claim4_u. 3296 file_delegate_prev)); | 3292 component_name(&claim->open_claim4_u. 3293 file_delegate_prev)); |
3297 break; 3298 } 3299} 3300 3301/* 3302 * Fill in a summary string for the given open_claim4. 3303 */ 3304static void 3305sum_claim(char *buf, size_t buflen, open_claim4 *claim) 3306{ 3307 char *bp = buf; 3308 3309 switch (claim->claim) { 3310 case CLAIM_NULL: 3311 snprintf(bp, buflen, " CT=N"); 3312 break; 3313 case CLAIM_PREVIOUS: 3314 snprintf(bp, buflen, " CT=P DT=%s", | 3294 break; 3295 } 3296} 3297 3298/* 3299 * Fill in a summary string for the given open_claim4. 3300 */ 3301static void 3302sum_claim(char *buf, size_t buflen, open_claim4 *claim) 3303{ 3304 char *bp = buf; 3305 3306 switch (claim->claim) { 3307 case CLAIM_NULL: 3308 snprintf(bp, buflen, " CT=N"); 3309 break; 3310 case CLAIM_PREVIOUS: 3311 snprintf(bp, buflen, " CT=P DT=%s", |
3315 get_deleg_typestr(claim->open_claim4_u.delegate_type)); | 3312 get_deleg_typestr(claim->open_claim4_u.delegate_type)); |
3316 break; 3317 case CLAIM_DELEGATE_CUR: 3318 snprintf(bp, buflen, " CT=DC %s", | 3313 break; 3314 case CLAIM_DELEGATE_CUR: 3315 snprintf(bp, buflen, " CT=DC %s", |
3319 sum_deleg_stateid(&claim->open_claim4_u. 3320 delegate_cur_info.delegate_stateid)); | 3316 sum_deleg_stateid(&claim->open_claim4_u. 3317 delegate_cur_info.delegate_stateid)); |
3321 break; 3322 case CLAIM_DELEGATE_PREV: 3323 snprintf(bp, buflen, " CT=DP"); 3324 break; 3325 default: 3326 snprintf(bp, buflen, " CT=?"); 3327 break; 3328 } --- 24 unchanged lines hidden (view full) --- 3353/* 3354 * Print detail information for the given open_claim4. 3355 */ 3356 3357static void 3358detail_claim(open_claim4 *claim) 3359{ 3360 sprintf(get_line(0, 0), "Claim Type = %d (%s)", | 3318 break; 3319 case CLAIM_DELEGATE_PREV: 3320 snprintf(bp, buflen, " CT=DP"); 3321 break; 3322 default: 3323 snprintf(bp, buflen, " CT=?"); 3324 break; 3325 } --- 24 unchanged lines hidden (view full) --- 3350/* 3351 * Print detail information for the given open_claim4. 3352 */ 3353 3354static void 3355detail_claim(open_claim4 *claim) 3356{ 3357 sprintf(get_line(0, 0), "Claim Type = %d (%s)", |
3361 claim->claim, claim_name(claim->claim)); | 3358 claim->claim, claim_name(claim->claim)); |
3362 3363 switch (claim->claim) { 3364 case CLAIM_NULL: 3365 detail_compname4(&claim->open_claim4_u.file); 3366 break; 3367 case CLAIM_PREVIOUS: 3368 sprintf(get_line(0, 0), "Delegate Type = %s (val = %d)", | 3359 3360 switch (claim->claim) { 3361 case CLAIM_NULL: 3362 detail_compname4(&claim->open_claim4_u.file); 3363 break; 3364 case CLAIM_PREVIOUS: 3365 sprintf(get_line(0, 0), "Delegate Type = %s (val = %d)", |
3369 get_deleg_typestr(claim->open_claim4_u.delegate_type), 3370 claim->open_claim4_u.delegate_type); | 3366 get_deleg_typestr(claim->open_claim4_u.delegate_type), 3367 claim->open_claim4_u.delegate_type); |
3371 break; 3372 case CLAIM_DELEGATE_CUR: 3373 detail_compname4(&claim->open_claim4_u.delegate_cur_info.file); 3374 detail_deleg_stateid(&claim->open_claim4_u.delegate_cur_info. | 3368 break; 3369 case CLAIM_DELEGATE_CUR: 3370 detail_compname4(&claim->open_claim4_u.delegate_cur_info.file); 3371 detail_deleg_stateid(&claim->open_claim4_u.delegate_cur_info. |
3375 delegate_stateid); | 3372 delegate_stateid); |
3376 break; 3377 case CLAIM_DELEGATE_PREV: 3378 detail_compname4(&claim->open_claim4_u.file_delegate_prev); 3379 break; 3380 } 3381} 3382 3383/* --- 26 unchanged lines hidden (view full) --- 3410sum_delegation(char *buf, size_t buflen, open_delegation4 *delp) 3411{ 3412 switch (delp->delegation_type) { 3413 case OPEN_DELEGATE_NONE: 3414 snprintf(buf, buflen, " DT=N"); 3415 break; 3416 case OPEN_DELEGATE_READ: 3417 snprintf(buf, buflen, " DT=R %s", | 3373 break; 3374 case CLAIM_DELEGATE_PREV: 3375 detail_compname4(&claim->open_claim4_u.file_delegate_prev); 3376 break; 3377 } 3378} 3379 3380/* --- 26 unchanged lines hidden (view full) --- 3407sum_delegation(char *buf, size_t buflen, open_delegation4 *delp) 3408{ 3409 switch (delp->delegation_type) { 3410 case OPEN_DELEGATE_NONE: 3411 snprintf(buf, buflen, " DT=N"); 3412 break; 3413 case OPEN_DELEGATE_READ: 3414 snprintf(buf, buflen, " DT=R %s", |
3418 sum_deleg_stateid(&delp->open_delegation4_u.write. 3419 stateid)); | 3415 sum_deleg_stateid(&delp->open_delegation4_u.write. 3416 stateid)); |
3420 break; 3421 case OPEN_DELEGATE_WRITE: 3422 snprintf(buf, buflen, " DT=W %s %s", | 3417 break; 3418 case OPEN_DELEGATE_WRITE: 3419 snprintf(buf, buflen, " DT=W %s %s", |
3423 sum_deleg_stateid(&delp->open_delegation4_u.write. 3424 stateid), 3425 sum_space_limit(&delp->open_delegation4_u.write. 3426 space_limit)); | 3420 sum_deleg_stateid(&delp->open_delegation4_u.write. 3421 stateid), 3422 sum_space_limit(&delp->open_delegation4_u.write. 3423 space_limit)); |
3427 break; 3428 default: 3429 snprintf(buf, buflen, " DT=?"); 3430 break; 3431 } 3432} 3433 3434static void 3435detail_delegation(open_delegation4 *delp) 3436{ 3437 sprintf(get_line(0, 0), "Delegation Type = %d (%s)", | 3424 break; 3425 default: 3426 snprintf(buf, buflen, " DT=?"); 3427 break; 3428 } 3429} 3430 3431static void 3432detail_delegation(open_delegation4 *delp) 3433{ 3434 sprintf(get_line(0, 0), "Delegation Type = %d (%s)", |
3438 delp->delegation_type, 3439 delegation_type_name(delp->delegation_type)); | 3435 delp->delegation_type, 3436 delegation_type_name(delp->delegation_type)); |
3440 3441 switch (delp->delegation_type) { 3442 case OPEN_DELEGATE_NONE: 3443 /* no-op */ 3444 break; 3445 case OPEN_DELEGATE_READ: 3446 detail_deleg_stateid(&delp->open_delegation4_u.read.stateid); 3447 sprintf(get_line(0, 0), "Recall = %s", | 3437 3438 switch (delp->delegation_type) { 3439 case OPEN_DELEGATE_NONE: 3440 /* no-op */ 3441 break; 3442 case OPEN_DELEGATE_READ: 3443 detail_deleg_stateid(&delp->open_delegation4_u.read.stateid); 3444 sprintf(get_line(0, 0), "Recall = %s", |
3448 delp->open_delegation4_u.read.recall ? 3449 "TRUE" : "FALSE"); | 3445 delp->open_delegation4_u.read.recall ? 3446 "TRUE" : "FALSE"); |
3450 sprintf(get_line(0, 0), "[nfsacl4]"); 3451 break; 3452 case OPEN_DELEGATE_WRITE: 3453 detail_deleg_stateid(&delp->open_delegation4_u.write.stateid); 3454 sprintf(get_line(0, 0), "Recall = %s", | 3447 sprintf(get_line(0, 0), "[nfsacl4]"); 3448 break; 3449 case OPEN_DELEGATE_WRITE: 3450 detail_deleg_stateid(&delp->open_delegation4_u.write.stateid); 3451 sprintf(get_line(0, 0), "Recall = %s", |
3455 delp->open_delegation4_u.write.recall ? 3456 "TRUE" : "FALSE"); | 3452 delp->open_delegation4_u.write.recall ? 3453 "TRUE" : "FALSE"); |
3457 detail_space_limit(&delp->open_delegation4_u.write. | 3454 detail_space_limit(&delp->open_delegation4_u.write. |
3458 space_limit); | 3455 space_limit); |
3459 sprintf(get_line(0, 0), "[nfsacl4]"); 3460 break; 3461 } 3462} 3463 3464 3465static void 3466detail_open_owner(open_owner4 *owner) 3467{ 3468 sprintf(get_line(0, 0), "Open Owner hash = [%04X] ", | 3456 sprintf(get_line(0, 0), "[nfsacl4]"); 3457 break; 3458 } 3459} 3460 3461 3462static void 3463detail_open_owner(open_owner4 *owner) 3464{ 3465 sprintf(get_line(0, 0), "Open Owner hash = [%04X] ", |
3469 owner_hash(&owner->owner)); | 3466 owner_hash(&owner->owner)); |
3470 sprintf(get_line(0, 0), " len = %u val = %s ", | 3467 sprintf(get_line(0, 0), " len = %u val = %s ", |
3471 owner->owner.owner_len, 3472 tohex(owner->owner.owner_val, owner->owner.owner_len)); | 3468 owner->owner.owner_len, 3469 tohex(owner->owner.owner_val, owner->owner.owner_len)); |
3473 detail_clientid(owner->clientid); 3474} 3475 3476static void 3477detail_lock_owner(lock_owner4 *owner) 3478{ 3479 sprintf(get_line(0, 0), "Lock Owner hash = [%04X] ", | 3470 detail_clientid(owner->clientid); 3471} 3472 3473static void 3474detail_lock_owner(lock_owner4 *owner) 3475{ 3476 sprintf(get_line(0, 0), "Lock Owner hash = [%04X] ", |
3480 owner_hash(&owner->owner)); | 3477 owner_hash(&owner->owner)); |
3481 sprintf(get_line(0, 0), " len = %u val = %s ", | 3478 sprintf(get_line(0, 0), " len = %u val = %s ", |
3482 owner->owner.owner_len, 3483 tohex(owner->owner.owner_val, owner->owner.owner_len)); | 3479 owner->owner.owner_len, 3480 tohex(owner->owner.owner_val, owner->owner.owner_len)); |
3484 detail_clientid(owner->clientid); 3485} 3486 3487static void 3488sum_openflag(char *bufp, int buflen, openflag4 *flagp) 3489{ 3490 if (flagp->opentype == OPEN4_CREATE) { 3491 switch (flagp->openflag4_u.how.mode) { 3492 case UNCHECKED4: 3493 snprintf(bufp, buflen, "OT=CR(U)"); 3494 break; 3495 case GUARDED4: 3496 snprintf(bufp, buflen, "OT=CR(G)"); 3497 break; 3498 case EXCLUSIVE4: 3499 snprintf(bufp, buflen, "OT=CR(E)"); 3500 break; 3501 default: 3502 snprintf(bufp, buflen, "OT=CR(?:%d)", | 3481 detail_clientid(owner->clientid); 3482} 3483 3484static void 3485sum_openflag(char *bufp, int buflen, openflag4 *flagp) 3486{ 3487 if (flagp->opentype == OPEN4_CREATE) { 3488 switch (flagp->openflag4_u.how.mode) { 3489 case UNCHECKED4: 3490 snprintf(bufp, buflen, "OT=CR(U)"); 3491 break; 3492 case GUARDED4: 3493 snprintf(bufp, buflen, "OT=CR(G)"); 3494 break; 3495 case EXCLUSIVE4: 3496 snprintf(bufp, buflen, "OT=CR(E)"); 3497 break; 3498 default: 3499 snprintf(bufp, buflen, "OT=CR(?:%d)", |
3503 flagp->openflag4_u.how.mode); | 3500 flagp->openflag4_u.how.mode); |
3504 break; 3505 } 3506 } else 3507 snprintf(bufp, buflen, "OT=NC"); 3508} 3509 3510static void 3511detail_openflag(openflag4 *flagp) 3512{ 3513 sprintf(get_line(0, 0), "Open Type = %s", | 3501 break; 3502 } 3503 } else 3504 snprintf(bufp, buflen, "OT=NC"); 3505} 3506 3507static void 3508detail_openflag(openflag4 *flagp) 3509{ 3510 sprintf(get_line(0, 0), "Open Type = %s", |
3514 flagp->opentype == OPEN4_CREATE ? "CREATE" : "NOCREATE"); | 3511 flagp->opentype == OPEN4_CREATE ? "CREATE" : "NOCREATE"); |
3515 if (flagp->opentype == OPEN4_CREATE) 3516 detail_createhow4(&flagp->openflag4_u.how); 3517} 3518 3519/* 3520 * Fill in buf with the given path. 3521 */ 3522static void 3523sum_pathname4(char *buf, size_t buflen, pathname4 *pathp) 3524{ 3525 char *bp = buf; 3526 uint_t component; 3527 3528 for (component = 0; component < pathp->pathname4_len; 3529 component++) { 3530 snprintf(bp, buflen - (bp - buf), | 3512 if (flagp->opentype == OPEN4_CREATE) 3513 detail_createhow4(&flagp->openflag4_u.how); 3514} 3515 3516/* 3517 * Fill in buf with the given path. 3518 */ 3519static void 3520sum_pathname4(char *buf, size_t buflen, pathname4 *pathp) 3521{ 3522 char *bp = buf; 3523 uint_t component; 3524 3525 for (component = 0; component < pathp->pathname4_len; 3526 component++) { 3527 snprintf(bp, buflen - (bp - buf), |
3531 component == 0 ? "%s" : "/%s", 3532 component_name(&pathp->pathname4_val[component])); | 3528 component == 0 ? "%s" : "/%s", 3529 component_name(&pathp->pathname4_val[component])); |
3533 bp += strlen(bp); 3534 } 3535} 3536 3537static void 3538sum_compname4(char *buf, size_t buflen, component4 *comp) 3539{ 3540 snprintf(buf, buflen, "%s", component_name(comp)); 3541} 3542 3543static void 3544detail_compname4(component4 *comp) 3545{ 3546 sprintf(get_line(0, 0), "%s", component_name(comp)); 3547} 3548 3549static void | 3530 bp += strlen(bp); 3531 } 3532} 3533 3534static void 3535sum_compname4(char *buf, size_t buflen, component4 *comp) 3536{ 3537 snprintf(buf, buflen, "%s", component_name(comp)); 3538} 3539 3540static void 3541detail_compname4(component4 *comp) 3542{ 3543 sprintf(get_line(0, 0), "%s", component_name(comp)); 3544} 3545 3546static void |
3550detail_pathname4(pathname4 *pathp) | 3547detail_pathname4(pathname4 *pathp, char *what) |
3551{ 3552 char *bp = get_line(0, 0); 3553 uint_t component; 3554 | 3548{ 3549 char *bp = get_line(0, 0); 3550 uint_t component; 3551 |
3555 sprintf(bp, "File name = "); | 3552 sprintf(bp, what); |
3556 bp += strlen(bp); 3557 3558 for (component = 0; component < pathp->pathname4_len; component++) { 3559 sprintf(bp, component == 0 ? "%s" : "/%s", | 3553 bp += strlen(bp); 3554 3555 for (component = 0; component < pathp->pathname4_len; component++) { 3556 sprintf(bp, component == 0 ? "%s" : "/%s", |
3560 component_name(&pathp->pathname4_val[component])); | 3557 component_name(&pathp->pathname4_val[component])); |
3561 bp += strlen(bp); 3562 } 3563} 3564 3565/* 3566 * Print detail information about the rpcsec_gss_info that is XDR-encoded 3567 * at mem. 3568 */ 3569 3570static void 3571detail_rpcsec_gss(rpcsec_gss_info *info) 3572{ 3573 sprintf(get_line(0, 0), "OID = %s", | 3558 bp += strlen(bp); 3559 } 3560} 3561 3562/* 3563 * Print detail information about the rpcsec_gss_info that is XDR-encoded 3564 * at mem. 3565 */ 3566 3567static void 3568detail_rpcsec_gss(rpcsec_gss_info *info) 3569{ 3570 sprintf(get_line(0, 0), "OID = %s", |
3574 tohex(info->oid.sec_oid4_val, info->oid.sec_oid4_len)); | 3571 tohex(info->oid.sec_oid4_val, info->oid.sec_oid4_len)); |
3575 sprintf(get_line(0, 0), "QOP = %u", info->qop); 3576 sprintf(get_line(0, 0), "Service = %d (%s)", | 3572 sprintf(get_line(0, 0), "QOP = %u", info->qop); 3573 sprintf(get_line(0, 0), "Service = %d (%s)", |
3577 info->service, gss_svc_name(info->service)); | 3574 info->service, gss_svc_name(info->service)); |
3578} 3579 3580/* 3581 * Print detail information about the given secinfo4. 3582 */ 3583 3584static void 3585detail_secinfo4(secinfo4 *infop) 3586{ 3587 sprintf(get_line(0, 0), "Flavor = %d (%s)", | 3575} 3576 3577/* 3578 * Print detail information about the given secinfo4. 3579 */ 3580 3581static void 3582detail_secinfo4(secinfo4 *infop) 3583{ 3584 sprintf(get_line(0, 0), "Flavor = %d (%s)", |
3588 infop->flavor, flavor_name(infop->flavor)); | 3585 infop->flavor, flavor_name(infop->flavor)); |
3589 switch (infop->flavor) { 3590 case RPCSEC_GSS: 3591 detail_rpcsec_gss(&infop->secinfo4_u.flavor_info); 3592 break; 3593 } 3594} 3595 3596 --- 6 unchanged lines hidden (view full) --- 3603{ 3604 static char buf[64]; 3605 int buflen = sizeof (buf); 3606 3607 buf[0] = '\0'; 3608 switch (limitp->limitby) { 3609 case NFS_LIMIT_SIZE: 3610 snprintf(buf, buflen, "LB=SZ(%llu)", | 3586 switch (infop->flavor) { 3587 case RPCSEC_GSS: 3588 detail_rpcsec_gss(&infop->secinfo4_u.flavor_info); 3589 break; 3590 } 3591} 3592 3593 --- 6 unchanged lines hidden (view full) --- 3600{ 3601 static char buf[64]; 3602 int buflen = sizeof (buf); 3603 3604 buf[0] = '\0'; 3605 switch (limitp->limitby) { 3606 case NFS_LIMIT_SIZE: 3607 snprintf(buf, buflen, "LB=SZ(%llu)", |
3611 limitp->nfs_space_limit4_u.filesize); | 3608 limitp->nfs_space_limit4_u.filesize); |
3612 break; 3613 case NFS_LIMIT_BLOCKS: 3614 snprintf(buf, buflen, "LB=BL(%u*%u)", | 3609 break; 3610 case NFS_LIMIT_BLOCKS: 3611 snprintf(buf, buflen, "LB=BL(%u*%u)", |
3615 limitp->nfs_space_limit4_u.mod_blocks.num_blocks, 3616 limitp->nfs_space_limit4_u.mod_blocks.bytes_per_block); | 3612 limitp->nfs_space_limit4_u.mod_blocks.num_blocks, 3613 limitp->nfs_space_limit4_u.mod_blocks.bytes_per_block); |
3617 break; 3618 default: 3619 snprintf(buf, buflen, "LB=?(%d)", limitp->limitby); 3620 break; 3621 } 3622 3623 return (buf); 3624} 3625 3626/* 3627 * Print detail information about the given nfs_space_limit4. 3628 */ 3629 3630static void 3631detail_space_limit(nfs_space_limit4 *limitp) 3632{ 3633 sprintf(get_line(0, 0), "LimitBy = %d (%s)", | 3614 break; 3615 default: 3616 snprintf(buf, buflen, "LB=?(%d)", limitp->limitby); 3617 break; 3618 } 3619 3620 return (buf); 3621} 3622 3623/* 3624 * Print detail information about the given nfs_space_limit4. 3625 */ 3626 3627static void 3628detail_space_limit(nfs_space_limit4 *limitp) 3629{ 3630 sprintf(get_line(0, 0), "LimitBy = %d (%s)", |
3634 limitp->limitby, 3635 limitby_name(limitp->limitby)); | 3631 limitp->limitby, 3632 limitby_name(limitp->limitby)); |
3636 3637 switch (limitp->limitby) { 3638 case NFS_LIMIT_SIZE: 3639 sprintf(get_line(0, 0), "Bytes = %llu", | 3633 3634 switch (limitp->limitby) { 3635 case NFS_LIMIT_SIZE: 3636 sprintf(get_line(0, 0), "Bytes = %llu", |
3640 limitp->nfs_space_limit4_u.filesize); | 3637 limitp->nfs_space_limit4_u.filesize); |
3641 break; 3642 case NFS_LIMIT_BLOCKS: 3643 sprintf(get_line(0, 0), "Blocks = %u", | 3638 break; 3639 case NFS_LIMIT_BLOCKS: 3640 sprintf(get_line(0, 0), "Blocks = %u", |
3644 limitp->nfs_space_limit4_u.mod_blocks.num_blocks); | 3641 limitp->nfs_space_limit4_u.mod_blocks.num_blocks); |
3645 sprintf(get_line(0, 0), "Bytes Per Block = %u", | 3642 sprintf(get_line(0, 0), "Bytes Per Block = %u", |
3646 limitp->nfs_space_limit4_u.mod_blocks.bytes_per_block); | 3643 limitp->nfs_space_limit4_u.mod_blocks.bytes_per_block); |
3647 break; 3648 } 3649} 3650 3651 3652/* 3653 * Return the short name of a file type. 3654 */ --- 267 unchanged lines hidden (view full) --- 3922 case NFS4ERR_GRACE: p = "NFS4ERR_GRACE"; break; 3923 case NFS4ERR_FHEXPIRED: p = "NFS4ERR_FHEXPIRED"; break; 3924 case NFS4ERR_SHARE_DENIED: p = "NFS4ERR_SHARE_DENIED"; break; 3925 case NFS4ERR_WRONGSEC: p = "NFS4ERR_WRONGSEC"; break; 3926 case NFS4ERR_CLID_INUSE: p = "NFS4ERR_CLID_INUSE"; break; 3927 case NFS4ERR_RESOURCE: p = "NFS4ERR_RESOURCE"; break; 3928 case NFS4ERR_MOVED: p = "NFS4ERR_MOVED"; break; 3929 case NFS4ERR_NOFILEHANDLE: p = "NFS4ERR_NOFILEHANDLE"; break; | 3644 break; 3645 } 3646} 3647 3648 3649/* 3650 * Return the short name of a file type. 3651 */ --- 267 unchanged lines hidden (view full) --- 3919 case NFS4ERR_GRACE: p = "NFS4ERR_GRACE"; break; 3920 case NFS4ERR_FHEXPIRED: p = "NFS4ERR_FHEXPIRED"; break; 3921 case NFS4ERR_SHARE_DENIED: p = "NFS4ERR_SHARE_DENIED"; break; 3922 case NFS4ERR_WRONGSEC: p = "NFS4ERR_WRONGSEC"; break; 3923 case NFS4ERR_CLID_INUSE: p = "NFS4ERR_CLID_INUSE"; break; 3924 case NFS4ERR_RESOURCE: p = "NFS4ERR_RESOURCE"; break; 3925 case NFS4ERR_MOVED: p = "NFS4ERR_MOVED"; break; 3926 case NFS4ERR_NOFILEHANDLE: p = "NFS4ERR_NOFILEHANDLE"; break; |
3930 case NFS4ERR_MINOR_VERS_MISMATCH: p = 3931 "NFS4ERR_MINOR_VERS_MISMATCH"; break; | 3927 case NFS4ERR_MINOR_VERS_MISMATCH: p = "NFS4ERR_MINOR_VERS_MISMATCH"; 3928 break; |
3932 case NFS4ERR_STALE_CLIENTID: p = "NFS4ERR_STALE_CLIENTID"; break; 3933 case NFS4ERR_STALE_STATEID: p = "NFS4ERR_STALE_STATEID"; break; 3934 case NFS4ERR_OLD_STATEID: p = "NFS4ERR_OLD_STATEID"; break; 3935 case NFS4ERR_BAD_STATEID: p = "NFS4ERR_BAD_STATEID"; break; 3936 case NFS4ERR_BAD_SEQID: p = "NFS4ERR_BAD_SEQID"; break; 3937 case NFS4ERR_NOT_SAME: p = "NFS4ERR_NOT_SAME"; break; 3938 case NFS4ERR_LOCK_RANGE: p = "NFS4ERR_LOCK_RANGE"; break; 3939 case NFS4ERR_SYMLINK: p = "NFS4ERR_SYMLINK"; break; --- 62 unchanged lines hidden (view full) --- 4002 bool_t first = TRUE; 4003 4004 if (!xdr_fattr4_fh_expire_type(xdr, &val)) 4005 longjmp(xdr_err, 1); 4006 buf = get_line(0, 0); 4007 4008 sprintf(buf, "Filehandle expire type = "); 4009 if ((val & (FH4_NOEXPIRE_WITH_OPEN | FH4_VOLATILE_ANY | | 3929 case NFS4ERR_STALE_CLIENTID: p = "NFS4ERR_STALE_CLIENTID"; break; 3930 case NFS4ERR_STALE_STATEID: p = "NFS4ERR_STALE_STATEID"; break; 3931 case NFS4ERR_OLD_STATEID: p = "NFS4ERR_OLD_STATEID"; break; 3932 case NFS4ERR_BAD_STATEID: p = "NFS4ERR_BAD_STATEID"; break; 3933 case NFS4ERR_BAD_SEQID: p = "NFS4ERR_BAD_SEQID"; break; 3934 case NFS4ERR_NOT_SAME: p = "NFS4ERR_NOT_SAME"; break; 3935 case NFS4ERR_LOCK_RANGE: p = "NFS4ERR_LOCK_RANGE"; break; 3936 case NFS4ERR_SYMLINK: p = "NFS4ERR_SYMLINK"; break; --- 62 unchanged lines hidden (view full) --- 3999 bool_t first = TRUE; 4000 4001 if (!xdr_fattr4_fh_expire_type(xdr, &val)) 4002 longjmp(xdr_err, 1); 4003 buf = get_line(0, 0); 4004 4005 sprintf(buf, "Filehandle expire type = "); 4006 if ((val & (FH4_NOEXPIRE_WITH_OPEN | FH4_VOLATILE_ANY | |
4010 FH4_VOL_MIGRATION | FH4_VOL_RENAME)) == 0) { | 4007 FH4_VOL_MIGRATION | FH4_VOL_RENAME)) == 0) { |
4011 strcat(buf, "Persistent"); 4012 return; 4013 } 4014 if (val & FH4_NOEXPIRE_WITH_OPEN) { 4015 strcat(buf, "No Expire With OPEN"); 4016 first = FALSE; 4017 } 4018 if (val & FH4_VOLATILE_ANY) { --- 43 unchanged lines hidden (view full) --- 4062static void 4063prt_link_support(XDR *xdr) 4064{ 4065 bool_t val; 4066 4067 if (!xdr_bool(xdr, &val)) 4068 longjmp(xdr_err, 1); 4069 sprintf(get_line(0, 0), "Link Support = %s", | 4008 strcat(buf, "Persistent"); 4009 return; 4010 } 4011 if (val & FH4_NOEXPIRE_WITH_OPEN) { 4012 strcat(buf, "No Expire With OPEN"); 4013 first = FALSE; 4014 } 4015 if (val & FH4_VOLATILE_ANY) { --- 43 unchanged lines hidden (view full) --- 4059static void 4060prt_link_support(XDR *xdr) 4061{ 4062 bool_t val; 4063 4064 if (!xdr_bool(xdr, &val)) 4065 longjmp(xdr_err, 1); 4066 sprintf(get_line(0, 0), "Link Support = %s", |
4070 val ? "TRUE" : "FALSE"); | 4067 val ? "TRUE" : "FALSE"); |
4071} 4072 4073static void 4074prt_symlink_support(XDR *xdr) 4075{ 4076 bool_t val; 4077 4078 if (!xdr_bool(xdr, &val)) 4079 longjmp(xdr_err, 1); 4080 sprintf(get_line(0, 0), "Symlink Support = %s", | 4068} 4069 4070static void 4071prt_symlink_support(XDR *xdr) 4072{ 4073 bool_t val; 4074 4075 if (!xdr_bool(xdr, &val)) 4076 longjmp(xdr_err, 1); 4077 sprintf(get_line(0, 0), "Symlink Support = %s", |
4081 val ? "TRUE" : "FALSE"); | 4078 val ? "TRUE" : "FALSE"); |
4082} 4083 4084static void 4085prt_named_attr(XDR *xdr) 4086{ 4087 bool_t val; 4088 4089 if (!xdr_bool(xdr, &val)) 4090 longjmp(xdr_err, 1); 4091 sprintf(get_line(0, 0), "Has Named Attributes = %s", | 4079} 4080 4081static void 4082prt_named_attr(XDR *xdr) 4083{ 4084 bool_t val; 4085 4086 if (!xdr_bool(xdr, &val)) 4087 longjmp(xdr_err, 1); 4088 sprintf(get_line(0, 0), "Has Named Attributes = %s", |
4092 val ? "TRUE" : "FALSE"); | 4089 val ? "TRUE" : "FALSE"); |
4093} 4094 4095static void 4096prt_fsid(XDR *xdr) 4097{ 4098 fsid4 val; 4099 4100 if (!xdr_fsid4(xdr, &val)) 4101 longjmp(xdr_err, 1); 4102 sprintf(get_line(0, 0), "FS ID: Major = %llx, Minor = %llx", | 4090} 4091 4092static void 4093prt_fsid(XDR *xdr) 4094{ 4095 fsid4 val; 4096 4097 if (!xdr_fsid4(xdr, &val)) 4098 longjmp(xdr_err, 1); 4099 sprintf(get_line(0, 0), "FS ID: Major = %llx, Minor = %llx", |
4103 val.major, val.minor); | 4100 val.major, val.minor); |
4104} 4105 4106static void 4107prt_unique_handles(XDR *xdr) 4108{ 4109 bool_t val; 4110 4111 if (!xdr_bool(xdr, &val)) 4112 longjmp(xdr_err, 1); 4113 sprintf(get_line(0, 0), "Unique Handles = %s", | 4101} 4102 4103static void 4104prt_unique_handles(XDR *xdr) 4105{ 4106 bool_t val; 4107 4108 if (!xdr_bool(xdr, &val)) 4109 longjmp(xdr_err, 1); 4110 sprintf(get_line(0, 0), "Unique Handles = %s", |
4114 val ? "TRUE" : "FALSE"); | 4111 val ? "TRUE" : "FALSE"); |
4115} 4116 4117static void 4118prt_lease_time(XDR *xdr) 4119{ 4120 uint32_t val; 4121 4122 if (!xdr_uint32_t(xdr, &val)) --- 4 unchanged lines hidden (view full) --- 4127static void 4128prt_rdattr_error(XDR *xdr) 4129{ 4130 nfsstat4 val; 4131 4132 if (!xdr_nfsstat4(xdr, &val)) 4133 longjmp(xdr_err, 1); 4134 sprintf(get_line(0, 0), "Rdattr Error = %u (%s)", | 4112} 4113 4114static void 4115prt_lease_time(XDR *xdr) 4116{ 4117 uint32_t val; 4118 4119 if (!xdr_uint32_t(xdr, &val)) --- 4 unchanged lines hidden (view full) --- 4124static void 4125prt_rdattr_error(XDR *xdr) 4126{ 4127 nfsstat4 val; 4128 4129 if (!xdr_nfsstat4(xdr, &val)) 4130 longjmp(xdr_err, 1); 4131 sprintf(get_line(0, 0), "Rdattr Error = %u (%s)", |
4135 val, status_name(val)); | 4132 val, status_name(val)); |
4136} 4137 4138static void 4139prt_acl(XDR *xdr) 4140{ 4141 static fattr4_acl val; 4142 char buffy[NFS4_OPAQUE_LIMIT]; 4143 int i, len; --- 104 unchanged lines hidden (view full) --- 4248static void 4249prt_archive(XDR *xdr) 4250{ 4251 bool_t val; 4252 4253 if (!xdr_bool(xdr, &val)) 4254 longjmp(xdr_err, 1); 4255 sprintf(get_line(0, 0), "Archived = %s", | 4133} 4134 4135static void 4136prt_acl(XDR *xdr) 4137{ 4138 static fattr4_acl val; 4139 char buffy[NFS4_OPAQUE_LIMIT]; 4140 int i, len; --- 104 unchanged lines hidden (view full) --- 4245static void 4246prt_archive(XDR *xdr) 4247{ 4248 bool_t val; 4249 4250 if (!xdr_bool(xdr, &val)) 4251 longjmp(xdr_err, 1); 4252 sprintf(get_line(0, 0), "Archived = %s", |
4256 val ? "TRUE" : "FALSE"); | 4253 val ? "TRUE" : "FALSE"); |
4257} 4258 4259static void 4260prt_cansettime(XDR *xdr) 4261{ 4262 bool_t val; 4263 4264 if (!xdr_bool(xdr, &val)) 4265 longjmp(xdr_err, 1); 4266 sprintf(get_line(0, 0), "Server Can Set Time = %s", | 4254} 4255 4256static void 4257prt_cansettime(XDR *xdr) 4258{ 4259 bool_t val; 4260 4261 if (!xdr_bool(xdr, &val)) 4262 longjmp(xdr_err, 1); 4263 sprintf(get_line(0, 0), "Server Can Set Time = %s", |
4267 val ? "TRUE" : "FALSE"); | 4264 val ? "TRUE" : "FALSE"); |
4268} 4269 4270static void 4271prt_case_insensitive(XDR *xdr) 4272{ 4273 bool_t val; 4274 4275 if (!xdr_bool(xdr, &val)) 4276 longjmp(xdr_err, 1); 4277 sprintf(get_line(0, 0), "Case Insensitive Lookups = %s", | 4265} 4266 4267static void 4268prt_case_insensitive(XDR *xdr) 4269{ 4270 bool_t val; 4271 4272 if (!xdr_bool(xdr, &val)) 4273 longjmp(xdr_err, 1); 4274 sprintf(get_line(0, 0), "Case Insensitive Lookups = %s", |
4278 val ? "TRUE" : "FALSE"); | 4275 val ? "TRUE" : "FALSE"); |
4279} 4280 4281static void 4282prt_case_preserving(XDR *xdr) 4283{ 4284 bool_t val; 4285 4286 if (!xdr_bool(xdr, &val)) 4287 longjmp(xdr_err, 1); 4288 sprintf(get_line(0, 0), "Case Preserving = %s", | 4276} 4277 4278static void 4279prt_case_preserving(XDR *xdr) 4280{ 4281 bool_t val; 4282 4283 if (!xdr_bool(xdr, &val)) 4284 longjmp(xdr_err, 1); 4285 sprintf(get_line(0, 0), "Case Preserving = %s", |
4289 val ? "TRUE" : "FALSE"); | 4286 val ? "TRUE" : "FALSE"); |
4290} 4291 4292static void 4293prt_chown_restricted(XDR *xdr) 4294{ 4295 bool_t val; 4296 4297 if (!xdr_bool(xdr, &val)) 4298 longjmp(xdr_err, 1); 4299 sprintf(get_line(0, 0), "Chown Is Restricted = %s", | 4287} 4288 4289static void 4290prt_chown_restricted(XDR *xdr) 4291{ 4292 bool_t val; 4293 4294 if (!xdr_bool(xdr, &val)) 4295 longjmp(xdr_err, 1); 4296 sprintf(get_line(0, 0), "Chown Is Restricted = %s", |
4300 val ? "TRUE" : "FALSE"); | 4297 val ? "TRUE" : "FALSE"); |
4301} 4302 4303static void 4304prt_filehandle(XDR *xdr) 4305{ 4306 static nfs_fh4 val; 4307 4308 if (!xdr_nfs_fh4(xdr, &val)) --- 48 unchanged lines hidden (view full) --- 4357 uint64_t val; 4358 4359 if (!xdr_uint64_t(xdr, &val)) 4360 longjmp(xdr_err, 1); 4361 sprintf(get_line(0, 0), "Files Total = %llu", val); 4362} 4363 4364static void | 4298} 4299 4300static void 4301prt_filehandle(XDR *xdr) 4302{ 4303 static nfs_fh4 val; 4304 4305 if (!xdr_nfs_fh4(xdr, &val)) --- 48 unchanged lines hidden (view full) --- 4354 uint64_t val; 4355 4356 if (!xdr_uint64_t(xdr, &val)) 4357 longjmp(xdr_err, 1); 4358 sprintf(get_line(0, 0), "Files Total = %llu", val); 4359} 4360 4361static void |
4362prt_fs_location(fs_location4 *fsl) 4363{ 4364 int i; 4365 4366 for (i = 0; i < fsl->server.server_len; i++) 4367 sprintf(get_line(0, 0), "server: %s", 4368 utf8localize(&fsl->server.server_val[i])); 4369 4370 detail_pathname4(&fsl->rootpath, "rootpath: "); 4371} 4372 4373static void |
|
4365prt_fs_locations(XDR *xdr) 4366{ 4367 static fs_locations4 val; | 4374prt_fs_locations(XDR *xdr) 4375{ 4376 static fs_locations4 val; |
4377 int i; |
|
4368 4369 if (!xdr_fs_locations4(xdr, &val)) 4370 longjmp(xdr_err, 1); | 4378 4379 if (!xdr_fs_locations4(xdr, &val)) 4380 longjmp(xdr_err, 1); |
4371 sprintf(get_line(0, 0), "[fs_locations]"); /* XXX */ 4372 detail_pathname4(&val.fs_root); | 4381 sprintf(get_line(0, 0), "[fs_locations]"); 4382 detail_pathname4(&val.fs_root, "fs_root: "); 4383 for (i = 0; i < val.locations.locations_len; i++) 4384 prt_fs_location(&val.locations.locations_val[i]); |
4373 xdr_free(xdr_fs_locations4, (char *)&val); 4374} 4375 4376static void 4377prt_hidden(XDR *xdr) 4378{ 4379 bool_t val; 4380 4381 if (!xdr_bool(xdr, &val)) 4382 longjmp(xdr_err, 1); 4383 sprintf(get_line(0, 0), "Hidden = %s", | 4385 xdr_free(xdr_fs_locations4, (char *)&val); 4386} 4387 4388static void 4389prt_hidden(XDR *xdr) 4390{ 4391 bool_t val; 4392 4393 if (!xdr_bool(xdr, &val)) 4394 longjmp(xdr_err, 1); 4395 sprintf(get_line(0, 0), "Hidden = %s", |
4384 val ? "TRUE" : "FALSE"); | 4396 val ? "TRUE" : "FALSE"); |
4385} 4386 4387static void 4388prt_homogeneous(XDR *xdr) 4389{ 4390 bool_t val; 4391 4392 if (!xdr_bool(xdr, &val)) 4393 longjmp(xdr_err, 1); 4394 sprintf(get_line(0, 0), "FS Is Homogeneous = %s", | 4397} 4398 4399static void 4400prt_homogeneous(XDR *xdr) 4401{ 4402 bool_t val; 4403 4404 if (!xdr_bool(xdr, &val)) 4405 longjmp(xdr_err, 1); 4406 sprintf(get_line(0, 0), "FS Is Homogeneous = %s", |
4395 val ? "TRUE" : "FALSE"); | 4407 val ? "TRUE" : "FALSE"); |
4396} 4397 4398static void 4399prt_maxfilesize(XDR *xdr) 4400{ 4401 uint64_t val; 4402 4403 if (!xdr_uint64_t(xdr, &val)) --- 66 unchanged lines hidden (view full) --- 4470static void 4471prt_no_trunc(XDR *xdr) 4472{ 4473 bool_t val; 4474 4475 if (!xdr_bool(xdr, &val)) 4476 longjmp(xdr_err, 1); 4477 sprintf(get_line(0, 0), "Long Names Are Error (no_trunc) = %s", | 4408} 4409 4410static void 4411prt_maxfilesize(XDR *xdr) 4412{ 4413 uint64_t val; 4414 4415 if (!xdr_uint64_t(xdr, &val)) --- 66 unchanged lines hidden (view full) --- 4482static void 4483prt_no_trunc(XDR *xdr) 4484{ 4485 bool_t val; 4486 4487 if (!xdr_bool(xdr, &val)) 4488 longjmp(xdr_err, 1); 4489 sprintf(get_line(0, 0), "Long Names Are Error (no_trunc) = %s", |
4478 val ? "TRUE" : "FALSE"); | 4490 val ? "TRUE" : "FALSE"); |
4479} 4480 4481static void 4482prt_numlinks(XDR *xdr) 4483{ 4484 uint32_t val; 4485 4486 if (!xdr_uint32_t(xdr, &val)) --- 56 unchanged lines hidden (view full) --- 4543static void 4544prt_rawdev(XDR *xdr) 4545{ 4546 specdata4 val; 4547 4548 if (!xdr_specdata4(xdr, &val)) 4549 longjmp(xdr_err, 1); 4550 sprintf(get_line(0, 0), "Raw Device ID = %u, %u", | 4491} 4492 4493static void 4494prt_numlinks(XDR *xdr) 4495{ 4496 uint32_t val; 4497 4498 if (!xdr_uint32_t(xdr, &val)) --- 56 unchanged lines hidden (view full) --- 4555static void 4556prt_rawdev(XDR *xdr) 4557{ 4558 specdata4 val; 4559 4560 if (!xdr_specdata4(xdr, &val)) 4561 longjmp(xdr_err, 1); 4562 sprintf(get_line(0, 0), "Raw Device ID = %u, %u", |
4551 val.specdata1, val.specdata2); | 4563 val.specdata1, val.specdata2); |
4552} 4553 4554static void 4555prt_space_avail(XDR *xdr) 4556{ 4557 uint64_t val; 4558 4559 if (!xdr_uint64_t(xdr, &val)) --- 34 unchanged lines hidden (view full) --- 4594static void 4595prt_system(XDR *xdr) 4596{ 4597 bool_t val; 4598 4599 if (!xdr_bool(xdr, &val)) 4600 longjmp(xdr_err, 1); 4601 sprintf(get_line(0, 0), "System File = %s", | 4564} 4565 4566static void 4567prt_space_avail(XDR *xdr) 4568{ 4569 uint64_t val; 4570 4571 if (!xdr_uint64_t(xdr, &val)) --- 34 unchanged lines hidden (view full) --- 4606static void 4607prt_system(XDR *xdr) 4608{ 4609 bool_t val; 4610 4611 if (!xdr_bool(xdr, &val)) 4612 longjmp(xdr_err, 1); 4613 sprintf(get_line(0, 0), "System File = %s", |
4602 val ? "TRUE" : "FALSE"); | 4614 val ? "TRUE" : "FALSE"); |
4603} 4604 4605static void 4606prt_time_access(XDR *xdr) 4607{ 4608 nfstime4 val; 4609 4610 if (!xdr_nfstime4(xdr, &val)) 4611 longjmp(xdr_err, 1); 4612 sprintf(get_line(0, 0), "Last Access Time = %s", | 4615} 4616 4617static void 4618prt_time_access(XDR *xdr) 4619{ 4620 nfstime4 val; 4621 4622 if (!xdr_nfstime4(xdr, &val)) 4623 longjmp(xdr_err, 1); 4624 sprintf(get_line(0, 0), "Last Access Time = %s", |
4613 format_time(val.seconds, val.nseconds)); | 4625 format_time(val.seconds, val.nseconds)); |
4614} 4615 4616static void 4617prt_time_access_set(XDR *xdr) 4618{ 4619 settime4 val; 4620 4621 if (!xdr_settime4(xdr, &val)) 4622 longjmp(xdr_err, 1); 4623 if (val.set_it == SET_TO_CLIENT_TIME4) { 4624 sprintf(get_line(0, 0), "Access Time = %s (set to client time)", | 4626} 4627 4628static void 4629prt_time_access_set(XDR *xdr) 4630{ 4631 settime4 val; 4632 4633 if (!xdr_settime4(xdr, &val)) 4634 longjmp(xdr_err, 1); 4635 if (val.set_it == SET_TO_CLIENT_TIME4) { 4636 sprintf(get_line(0, 0), "Access Time = %s (set to client time)", |
4625 format_time(val.settime4_u.time.seconds, 4626 val.settime4_u.time.nseconds)); | 4637 format_time(val.settime4_u.time.seconds, 4638 val.settime4_u.time.nseconds)); |
4627 } else if (val.set_it == SET_TO_SERVER_TIME4) { 4628 sprintf(get_line(0, 0), "Access Time (set to server time)"); 4629 } else 4630 longjmp(xdr_err, 1); 4631} 4632 4633static void 4634prt_time_backup(XDR *xdr) 4635{ 4636 nfstime4 val; 4637 4638 if (!xdr_nfstime4(xdr, &val)) 4639 longjmp(xdr_err, 1); 4640 sprintf(get_line(0, 0), "Last Backup Time = %s", | 4639 } else if (val.set_it == SET_TO_SERVER_TIME4) { 4640 sprintf(get_line(0, 0), "Access Time (set to server time)"); 4641 } else 4642 longjmp(xdr_err, 1); 4643} 4644 4645static void 4646prt_time_backup(XDR *xdr) 4647{ 4648 nfstime4 val; 4649 4650 if (!xdr_nfstime4(xdr, &val)) 4651 longjmp(xdr_err, 1); 4652 sprintf(get_line(0, 0), "Last Backup Time = %s", |
4641 format_time(val.seconds, val.nseconds)); | 4653 format_time(val.seconds, val.nseconds)); |
4642} 4643 4644static void 4645prt_time_create(XDR *xdr) 4646{ 4647 nfstime4 val; 4648 4649 if (!xdr_nfstime4(xdr, &val)) 4650 longjmp(xdr_err, 1); 4651 sprintf(get_line(0, 0), "Creation Time = %s", | 4654} 4655 4656static void 4657prt_time_create(XDR *xdr) 4658{ 4659 nfstime4 val; 4660 4661 if (!xdr_nfstime4(xdr, &val)) 4662 longjmp(xdr_err, 1); 4663 sprintf(get_line(0, 0), "Creation Time = %s", |
4652 format_time(val.seconds, val.nseconds)); | 4664 format_time(val.seconds, val.nseconds)); |
4653} 4654 4655static void 4656prt_time_delta(XDR *xdr) 4657{ 4658 nfstime4 val; 4659 4660 if (!xdr_nfstime4(xdr, &val)) 4661 longjmp(xdr_err, 1); 4662 sprintf(get_line(0, 0), "Server Time Granularity = %lld.%09d sec", | 4665} 4666 4667static void 4668prt_time_delta(XDR *xdr) 4669{ 4670 nfstime4 val; 4671 4672 if (!xdr_nfstime4(xdr, &val)) 4673 longjmp(xdr_err, 1); 4674 sprintf(get_line(0, 0), "Server Time Granularity = %lld.%09d sec", |
4663 val.seconds, val.nseconds); | 4675 val.seconds, val.nseconds); |
4664} 4665 4666static void 4667prt_time_metadata(XDR *xdr) 4668{ 4669 nfstime4 val; 4670 4671 if (!xdr_nfstime4(xdr, &val)) 4672 longjmp(xdr_err, 1); 4673 sprintf(get_line(0, 0), "Last Metadata Change Time = %s", | 4676} 4677 4678static void 4679prt_time_metadata(XDR *xdr) 4680{ 4681 nfstime4 val; 4682 4683 if (!xdr_nfstime4(xdr, &val)) 4684 longjmp(xdr_err, 1); 4685 sprintf(get_line(0, 0), "Last Metadata Change Time = %s", |
4674 format_time(val.seconds, val.nseconds)); | 4686 format_time(val.seconds, val.nseconds)); |
4675} 4676 4677static void 4678prt_time_modify(XDR *xdr) 4679{ 4680 nfstime4 val; 4681 4682 if (!xdr_nfstime4(xdr, &val)) 4683 longjmp(xdr_err, 1); 4684 sprintf(get_line(0, 0), "Last Modification Time = %s", | 4687} 4688 4689static void 4690prt_time_modify(XDR *xdr) 4691{ 4692 nfstime4 val; 4693 4694 if (!xdr_nfstime4(xdr, &val)) 4695 longjmp(xdr_err, 1); 4696 sprintf(get_line(0, 0), "Last Modification Time = %s", |
4685 format_time(val.seconds, val.nseconds)); | 4697 format_time(val.seconds, val.nseconds)); |
4686} 4687 4688static void 4689prt_time_modify_set(XDR *xdr) 4690{ 4691 settime4 val; 4692 4693 if (!xdr_settime4(xdr, &val)) 4694 longjmp(xdr_err, 1); 4695 if (val.set_it == SET_TO_CLIENT_TIME4) { 4696 sprintf(get_line(0, 0), | 4698} 4699 4700static void 4701prt_time_modify_set(XDR *xdr) 4702{ 4703 settime4 val; 4704 4705 if (!xdr_settime4(xdr, &val)) 4706 longjmp(xdr_err, 1); 4707 if (val.set_it == SET_TO_CLIENT_TIME4) { 4708 sprintf(get_line(0, 0), |
4697 "Modification Time = %s (set to client time)", 4698 format_time(val.settime4_u.time.seconds, 4699 val.settime4_u.time.nseconds)); | 4709 "Modification Time = %s (set to client time)", 4710 format_time(val.settime4_u.time.seconds, 4711 val.settime4_u.time.nseconds)); |
4700 } else if (val.set_it == SET_TO_SERVER_TIME4) { 4701 sprintf(get_line(0, 0), | 4712 } else if (val.set_it == SET_TO_SERVER_TIME4) { 4713 sprintf(get_line(0, 0), |
4702 "Modification Time (set to server time)"); | 4714 "Modification Time (set to server time)"); |
4703 } else 4704 longjmp(xdr_err, 1); 4705} 4706 4707/* 4708 * Display the UTF8 string that is next in the XDR stream. 4709 */ 4710 --- 44 unchanged lines hidden (view full) --- 4755 if (oldsize < len + 1) { 4756 /* truncate opaques at NFS4_OPAQUE_LIMIT */ 4757 if (len > NFS4_OPAQUE_LIMIT) 4758 len = NFS4_OPAQUE_LIMIT; 4759 newsize = len + 1; 4760 } 4761 if (newsize != oldsize) { 4762 utf_buf[cur_utf_buf] = realloc(utf_buf[cur_utf_buf], | 4715 } else 4716 longjmp(xdr_err, 1); 4717} 4718 4719/* 4720 * Display the UTF8 string that is next in the XDR stream. 4721 */ 4722 --- 44 unchanged lines hidden (view full) --- 4767 if (oldsize < len + 1) { 4768 /* truncate opaques at NFS4_OPAQUE_LIMIT */ 4769 if (len > NFS4_OPAQUE_LIMIT) 4770 len = NFS4_OPAQUE_LIMIT; 4771 newsize = len + 1; 4772 } 4773 if (newsize != oldsize) { 4774 utf_buf[cur_utf_buf] = realloc(utf_buf[cur_utf_buf], |
4763 newsize); | 4775 newsize); |
4764 if (utf_buf[cur_utf_buf] == NULL) { 4765 pr_err("out of memory\n"); 4766 utf_buflen[cur_utf_buf] = 0; 4767 return (""); 4768 } 4769 utf_buflen[cur_utf_buf] = newsize; 4770 } 4771 --- 117 unchanged lines hidden --- | 4776 if (utf_buf[cur_utf_buf] == NULL) { 4777 pr_err("out of memory\n"); 4778 utf_buflen[cur_utf_buf] = 0; 4779 return (""); 4780 } 4781 utf_buflen[cur_utf_buf] = newsize; 4782 } 4783 --- 117 unchanged lines hidden --- |