Ignore:
File:
1 edited

Legend:

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

    r6c4eedf r1d6dd2a  
    4444#include <stdio.h>
    4545#include <stdlib.h>
     46#include <str_error.h>
    4647#include <task.h>
    4748#include <vfs/vfs.h>
     49#include <str.h>
    4850
    4951#include "futil.h"
     
    8284 * @param pdev Place to store partition device name
    8385 *
    84  * @return EOK on success or error code
    85  */
    86 static int sysinst_label_dev(const char *dev, char **pdev)
     86 * @return EOK on success or an error code
     87 */
     88static errno_t sysinst_label_dev(const char *dev, char **pdev)
    8789{
    8890        fdisk_t *fdisk;
     
    9294        cap_spec_t cap;
    9395        service_id_t sid;
    94         int rc;
     96        errno_t rc;
    9597
    9698        printf("sysinst_label_dev(): get service ID '%s'\n", dev);
     
    117119        rc = fdisk_label_create(fdev, lt_mbr);
    118120        if (rc != EOK) {
    119                 printf("Error creating label (%d).\n", rc);
     121                printf("Error creating label: %s.\n", str_error(rc));
    120122                return rc;
    121123        }
     
    125127        rc = fdisk_part_get_max_avail(fdev, spc_pri, &cap);
    126128        if (rc != EOK) {
    127                 printf("Error getting available capacity (%d).\n", rc);
     129                printf("Error getting available capacity: %s.\n", str_error(rc));
    128130                return rc;
    129131        }
     
    141143
    142144        /* XXX libfdisk should give us the service name */
    143         rc = asprintf(pdev, "%sp1", dev);
    144         if (rc < 0)
     145        if (asprintf(pdev, "%sp1", dev) < 0)
    145146                return ENOMEM;
    146147
     
    152153 *
    153154 * @param dev Partition device
    154  * @return EOK on success or error code
    155  */
    156 static int sysinst_fs_mount(const char *dev)
     155 * @return EOK on success or an error code
     156 */
     157static errno_t sysinst_fs_mount(const char *dev)
    157158{
    158159        task_wait_t twait;
    159160        task_exit_t texit;
    160         int rc;
     161        errno_t rc;
    161162        int trc;
    162163
     
    191192/** Copy boot files.
    192193 *
    193  * @return EOK on success or error code
    194  */
    195 static int sysinst_copy_boot_files(void)
     194 * @return EOK on success or an error code
     195 */
     196static errno_t sysinst_copy_boot_files(void)
    196197{
    197198        task_wait_t twait;
    198199        task_exit_t texit;
    199         int rc;
     200        errno_t rc;
    200201        int trc;
    201202
     
    258259 *
    259260 * @param devp Disk device
    260  * @return EOK on success or error code
    261  */
    262 static int sysinst_copy_boot_blocks(const char *devp)
     261 * @return EOK on success or an error code
     262 */
     263static errno_t sysinst_copy_boot_blocks(const char *devp)
    263264{
    264265        void *boot_img;
     
    272273        aoff64_t core_blocks;
    273274        grub_boot_blocklist_t *first_bl, *bl;
    274         int rc;
     275        errno_t rc;
    275276
    276277        printf("sysinst_copy_boot_blocks: Read boot block image.\n");
     
    353354 *
    354355 * @param dev Device to install to.
    355  * @return EOK on success or error code
    356  */
    357 static int sysinst_install(const char *dev)
    358 {
    359         int rc;
     356 * @return EOK on success or an error code
     357 */
     358static errno_t sysinst_install(const char *dev)
     359{
     360        errno_t rc;
    360361        char *pdev;
    361362
Note: See TracChangeset for help on using the changeset viewer.