X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/b2c224be1941200e87df73bd937925f3bdf8cddc..c0a93a9efabae3c9a8500bf2f14ffb06e313dc73:/hw/virtio-9p-debug.c diff --git a/hw/virtio-9p-debug.c b/hw/virtio-9p-debug.c index 2e61e9d11a..6b18842fd4 100644 --- a/hw/virtio-9p-debug.c +++ b/hw/virtio-9p-debug.c @@ -169,12 +169,10 @@ static void pprint_stat(V9fsPDU *pdu, int rx, size_t *offsetp, const char *name) pprint_str(pdu, rx, offsetp, ", uid"); pprint_str(pdu, rx, offsetp, ", gid"); pprint_str(pdu, rx, offsetp, ", muid"); - if (dotu) { - pprint_str(pdu, rx, offsetp, ", extension"); - pprint_int32(pdu, rx, offsetp, ", uid"); - pprint_int32(pdu, rx, offsetp, ", gid"); - pprint_int32(pdu, rx, offsetp, ", muid"); - } + pprint_str(pdu, rx, offsetp, ", extension"); + pprint_int32(pdu, rx, offsetp, ", uid"); + pprint_int32(pdu, rx, offsetp, ", gid"); + pprint_int32(pdu, rx, offsetp, ", muid"); fprintf(llogfile, "}"); } @@ -367,6 +365,17 @@ void pprint_pdu(V9fsPDU *pdu) pprint_data(pdu, 1, &offset, ", data"); #endif break; + case P9_TMKDIR: + fprintf(llogfile, "TMKDIR: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_str(pdu, 0, &offset, "name"); + pprint_int32(pdu, 0, &offset, "mode"); + pprint_int32(pdu, 0, &offset, "gid"); + break; + case P9_RMKDIR: + fprintf(llogfile, "RMKDIR: ("); + pprint_qid(pdu, 0, &offset, "qid"); + break; case P9_TVERSION: fprintf(llogfile, "TVERSION: ("); pprint_int32(pdu, 0, &offset, "msize"); @@ -390,9 +399,7 @@ void pprint_pdu(V9fsPDU *pdu) pprint_int32(pdu, 0, &offset, "afid"); pprint_str(pdu, 0, &offset, ", uname"); pprint_str(pdu, 0, &offset, ", aname"); - if (dotu) { - pprint_int32(pdu, 0, &offset, ", n_uname"); - } + pprint_int32(pdu, 0, &offset, ", n_uname"); break; case P9_RAUTH: fprintf(llogfile, "RAUTH: ("); @@ -404,9 +411,7 @@ void pprint_pdu(V9fsPDU *pdu) pprint_int32(pdu, 0, &offset, ", afid"); pprint_str(pdu, 0, &offset, ", uname"); pprint_str(pdu, 0, &offset, ", aname"); - if (dotu) { - pprint_int32(pdu, 0, &offset, ", n_uname"); - } + pprint_int32(pdu, 0, &offset, ", n_uname"); break; case P9_RATTACH: fprintf(llogfile, "RATTACH: ("); @@ -418,9 +423,7 @@ void pprint_pdu(V9fsPDU *pdu) case P9_RERROR: fprintf(llogfile, "RERROR: ("); pprint_str(pdu, 1, &offset, "ename"); - if (dotu) { - pprint_int32(pdu, 1, &offset, ", ecode"); - } + pprint_int32(pdu, 1, &offset, ", ecode"); break; case P9_TFLUSH: fprintf(llogfile, "TFLUSH: ("); @@ -455,15 +458,58 @@ void pprint_pdu(V9fsPDU *pdu) pprint_str(pdu, 0, &offset, ", name"); pprint_int32(pdu, 0, &offset, ", perm"); pprint_int8(pdu, 0, &offset, ", mode"); - if (dotu) { - pprint_str(pdu, 0, &offset, ", extension"); - } + pprint_str(pdu, 0, &offset, ", extension"); break; case P9_RCREATE: fprintf(llogfile, "RCREATE: ("); pprint_qid(pdu, 1, &offset, "qid"); pprint_int32(pdu, 1, &offset, ", iounit"); break; + case P9_TSYMLINK: + fprintf(llogfile, "TSYMLINK: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_str(pdu, 0, &offset, ", name"); + pprint_str(pdu, 0, &offset, ", symname"); + pprint_int32(pdu, 0, &offset, ", gid"); + break; + case P9_RSYMLINK: + fprintf(llogfile, "RSYMLINK: ("); + pprint_qid(pdu, 1, &offset, "qid"); + break; + case P9_TLCREATE: + fprintf(llogfile, "TLCREATE: ("); + pprint_int32(pdu, 0, &offset, "dfid"); + pprint_str(pdu, 0, &offset, ", name"); + pprint_int32(pdu, 0, &offset, ", flags"); + pprint_int32(pdu, 0, &offset, ", mode"); + pprint_int32(pdu, 0, &offset, ", gid"); + break; + case P9_RLCREATE: + fprintf(llogfile, "RLCREATE: ("); + pprint_qid(pdu, 1, &offset, "qid"); + pprint_int32(pdu, 1, &offset, ", iounit"); + break; + case P9_TMKNOD: + fprintf(llogfile, "TMKNOD: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_str(pdu, 0, &offset, "name"); + pprint_int32(pdu, 0, &offset, "mode"); + pprint_int32(pdu, 0, &offset, "major"); + pprint_int32(pdu, 0, &offset, "minor"); + pprint_int32(pdu, 0, &offset, "gid"); + break; + case P9_RMKNOD: + fprintf(llogfile, "RMKNOD: )"); + pprint_qid(pdu, 0, &offset, "qid"); + break; + case P9_TREADLINK: + fprintf(llogfile, "TREADLINK: ("); + pprint_int32(pdu, 0, &offset, "fid"); + break; + case P9_RREADLINK: + fprintf(llogfile, "RREADLINK: ("); + pprint_str(pdu, 0, &offset, "target"); + break; case P9_TREAD: fprintf(llogfile, "TREAD: ("); pprint_int32(pdu, 0, &offset, "fid"); @@ -497,10 +543,17 @@ void pprint_pdu(V9fsPDU *pdu) case P9_RCLUNK: fprintf(llogfile, "RCLUNK: ("); break; + case P9_TFSYNC: + fprintf(llogfile, "TFSYNC: ("); + pprint_int32(pdu, 0, &offset, "fid"); + break; + case P9_RFSYNC: + fprintf(llogfile, "RFSYNC: ("); + break; case P9_TLINK: fprintf(llogfile, "TLINK: ("); - pprint_int32(pdu, 0, &offset, "fid"); - pprint_str(pdu, 0, &offset, ", oldpath"); + pprint_int32(pdu, 0, &offset, "dfid"); + pprint_int32(pdu, 0, &offset, ", fid"); pprint_str(pdu, 0, &offset, ", newpath"); break; case P9_RLINK: @@ -531,6 +584,56 @@ void pprint_pdu(V9fsPDU *pdu) case P9_RWSTAT: fprintf(llogfile, "RWSTAT: ("); break; + case P9_TXATTRWALK: + fprintf(llogfile, "TXATTRWALK: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_int32(pdu, 0, &offset, ", newfid"); + pprint_str(pdu, 0, &offset, ", xattr name"); + break; + case P9_RXATTRWALK: + fprintf(llogfile, "RXATTRWALK: ("); + pprint_int64(pdu, 1, &offset, "xattrsize"); + case P9_TXATTRCREATE: + fprintf(llogfile, "TXATTRCREATE: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_str(pdu, 0, &offset, ", name"); + pprint_int64(pdu, 0, &offset, ", xattrsize"); + pprint_int32(pdu, 0, &offset, ", flags"); + break; + case P9_RXATTRCREATE: + fprintf(llogfile, "RXATTRCREATE: ("); + break; + case P9_TLOCK: + fprintf(llogfile, "TLOCK: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_int8(pdu, 0, &offset, ", type"); + pprint_int32(pdu, 0, &offset, ", flags"); + pprint_int64(pdu, 0, &offset, ", start"); + pprint_int64(pdu, 0, &offset, ", length"); + pprint_int32(pdu, 0, &offset, ", proc_id"); + pprint_str(pdu, 0, &offset, ", client_id"); + break; + case P9_RLOCK: + fprintf(llogfile, "RLOCK: ("); + pprint_int8(pdu, 0, &offset, "status"); + break; + case P9_TGETLOCK: + fprintf(llogfile, "TGETLOCK: ("); + pprint_int32(pdu, 0, &offset, "fid"); + pprint_int8(pdu, 0, &offset, ", type"); + pprint_int64(pdu, 0, &offset, ", start"); + pprint_int64(pdu, 0, &offset, ", length"); + pprint_int32(pdu, 0, &offset, ", proc_id"); + pprint_str(pdu, 0, &offset, ", client_id"); + break; + case P9_RGETLOCK: + fprintf(llogfile, "RGETLOCK: ("); + pprint_int8(pdu, 0, &offset, "type"); + pprint_int64(pdu, 0, &offset, ", start"); + pprint_int64(pdu, 0, &offset, ", length"); + pprint_int32(pdu, 0, &offset, ", proc_id"); + pprint_str(pdu, 0, &offset, ", client_id"); + break; default: fprintf(llogfile, "unknown(%d): (", pdu->id); break;