@@ -1317,25 +1317,17 @@ static lookup_t *lookup_common (flux_t *h, flux_msg_handler_t *mh,
13171317 struct flux_msg_cred cred ;
13181318 int root_seq = -1 ;
13191319
1320- if (flux_request_unpack (msg , NULL , "{ s:s s:i }" ,
1320+ /* namespace, rootdir, and rootseq optional */
1321+ if (flux_request_unpack (msg , NULL , "{ s:s s:i s?s s?o s?i}" ,
13211322 "key" , & key ,
1322- "flags" , & flags ) < 0 ) {
1323+ "flags" , & flags ,
1324+ "namespace" , & ns ,
1325+ "rootdir" , & root_dirent ,
1326+ "rootseq" , & root_seq ) < 0 ) {
13231327 flux_log_error (h , "%s: flux_request_unpack" , __FUNCTION__ );
13241328 goto done ;
13251329 }
13261330
1327- /* namespace is optional */
1328- (void )flux_request_unpack (msg , NULL , "{ s:s }" ,
1329- "namespace" , & ns );
1330-
1331- /* rootdir is optional */
1332- (void )flux_request_unpack (msg , NULL , "{ s:o }" ,
1333- "rootdir" , & root_dirent );
1334-
1335- /* rootseq is optional */
1336- (void )flux_request_unpack (msg , NULL , "{ s:i }" ,
1337- "rootseq" , & root_seq );
1338-
13391331 /* either namespace or rootdir must be specified */
13401332 if (!ns && !root_dirent ) {
13411333 errno = EPROTO ;
0 commit comments