@@ -8804,6 +8804,7 @@ static int dir_receive(int argc, char **argv, struct command *acmd, struct plugi
88048804 _cleanup_nvme_global_ctx_ struct nvme_global_ctx * ctx = NULL ;
88058805 _cleanup_nvme_transport_handle_ struct nvme_transport_handle * hdl = NULL ;
88068806 _cleanup_free_ void * buf = NULL ;
8807+ struct nvme_passthru_cmd cmd ;
88078808 __u32 result ;
88088809 __u32 dw12 = 0 ;
88098810 int err ;
@@ -8890,19 +8891,10 @@ static int dir_receive(int argc, char **argv, struct command *acmd, struct plugi
88908891 return - ENOMEM ;
88918892 }
88928893
8893- struct nvme_directive_recv_args args = {
8894- .args_size = sizeof (args ),
8895- .nsid = cfg .namespace_id ,
8896- .dspec = cfg .dspec ,
8897- .doper = cfg .doper ,
8898- .dtype = cfg .dtype ,
8899- .cdw12 = dw12 ,
8900- .data_len = cfg .data_len ,
8901- .data = buf ,
8902- .timeout = nvme_cfg .timeout ,
8903- .result = & result ,
8904- };
8905- err = nvme_directive_recv (hdl , & args );
8894+ nvme_init_directive_recv (& cmd , cfg .namespace_id , cfg .doper , cfg .dtype ,
8895+ cfg .dspec , buf , cfg .data_len );
8896+ cmd .cdw12 = dw12 ;
8897+ err = nvme_submit_admin_passthru (hdl , & cmd , & result );
89068898 if (!err )
89078899 nvme_directive_show (cfg .dtype , cfg .doper , cfg .dspec , cfg .namespace_id ,
89088900 result , buf , cfg .data_len , flags );
0 commit comments