1226 {
1227 ipp_action_id_t aid;
1228 int ipp_rc;
1229 int rc;
1230
1231 /*
1232 * Look up the action id and modify the action.
1233 */
1234
1235 aid = ipp_action_lookup(aname);
1236 FREE_TEXT(aname);
1237
1238 ipp_rc = ipp_action_modify(aid, &nvlp, flags);
1239
1240 /*
1241 * Add an nvlist containing the kernel return code to the
1242 * set of nvlists to pass back to libipp.
1243 */
1244
1245 if ((rc = ippctl_set_rc(ipp_rc)) != 0) {
1246 if (nvlp != NULL)
1247 nvlist_free(nvlp);
1248 return (rc);
1249 }
1250
1251 /*
1252 * If the module passed back an nvlist, add this as
1253 * well.
1254 */
1255
1256 if (nvlp != NULL) {
1257 rc = ippctl_callback(nvlp, NULL);
1258 nvlist_free(nvlp);
1259 } else
1260 rc = 0;
1261
1262 return (rc);
1263 }
1264 #undef __FN__
1265
1266 #define __FN__ "ippctl_action_info"
|
1226 {
1227 ipp_action_id_t aid;
1228 int ipp_rc;
1229 int rc;
1230
1231 /*
1232 * Look up the action id and modify the action.
1233 */
1234
1235 aid = ipp_action_lookup(aname);
1236 FREE_TEXT(aname);
1237
1238 ipp_rc = ipp_action_modify(aid, &nvlp, flags);
1239
1240 /*
1241 * Add an nvlist containing the kernel return code to the
1242 * set of nvlists to pass back to libipp.
1243 */
1244
1245 if ((rc = ippctl_set_rc(ipp_rc)) != 0) {
1246 nvlist_free(nvlp);
1247 return (rc);
1248 }
1249
1250 /*
1251 * If the module passed back an nvlist, add this as
1252 * well.
1253 */
1254
1255 if (nvlp != NULL) {
1256 rc = ippctl_callback(nvlp, NULL);
1257 nvlist_free(nvlp);
1258 } else
1259 rc = 0;
1260
1261 return (rc);
1262 }
1263 #undef __FN__
1264
1265 #define __FN__ "ippctl_action_info"
|