-int llog_cat_initialize(struct obd_device *obd, struct obd_llog_group *olg,
- int count, struct obd_uuid *uuid)
-{
- char name[32] = CATLIST;
- struct llog_catid *idarray = NULL;
- int size = sizeof(*idarray) * count;
- int rc;
- ENTRY;
-
- if (count) {
- OBD_VMALLOC(idarray, size);
- if (!idarray)
- RETURN(-ENOMEM);
- }
-
- rc = llog_get_cat_list(obd, obd, name, count, idarray);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- rc = obd_llog_init(obd, olg, obd, count, idarray, uuid);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- rc = llog_put_cat_list(obd, obd, name, count, idarray);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- out:
- if (idarray)
- OBD_VFREE(idarray, size);
- RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_initialize);
-