Changeset b4ca0a9c in mainline for uspace/app/loc/loc.c


Ignore:
Timestamp:
2012-07-10T11:53:50Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e01a35
Parents:
a33706e (diff), 33fc3ae (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/loc/loc.c

    ra33706e rb4ca0a9c  
    4848        size_t svc_cnt;
    4949        char *svc_name;
     50        char *server_name;
    5051        int rc;
    5152        size_t j;
    5253
    53         printf("%s (%" PRIun "):\n", cat_name, cat_id);
     54        printf("%s:\n", cat_name);
    5455
    5556        rc = loc_category_get_svcs(cat_id, &svc_ids, &svc_cnt);
     
    6768                        continue;
    6869                }
    69                 printf("\t%s (%" PRIun ")\n", svc_name, svc_ids[j]);
     70
     71                rc = loc_service_get_server_name(svc_ids[j], &server_name);
     72                if (rc != EOK && rc != EINVAL) {
     73                        free(svc_name);
     74                        printf(NAME ": Unknown service name (SID %"
     75                            PRIun ").\n", svc_ids[j]);
     76                        continue;
     77                }
     78
     79                if (rc == EOK)
     80                        printf("\t%s : %s\n", svc_name, server_name);
     81                else
     82                        printf("\t%s\n", svc_name);
     83       
    7084                free(svc_name);
     85                free(server_name);
    7186        }
    7287
Note: See TracChangeset for help on using the changeset viewer.