Changes in uspace/app/sysinst/sysinst.c [6c4eedf:1d6dd2a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sysinst/sysinst.c
r6c4eedf r1d6dd2a 44 44 #include <stdio.h> 45 45 #include <stdlib.h> 46 #include <str_error.h> 46 47 #include <task.h> 47 48 #include <vfs/vfs.h> 49 #include <str.h> 48 50 49 51 #include "futil.h" … … 82 84 * @param pdev Place to store partition device name 83 85 * 84 * @return EOK on success or error code85 */ 86 static int sysinst_label_dev(const char *dev, char **pdev)86 * @return EOK on success or an error code 87 */ 88 static errno_t sysinst_label_dev(const char *dev, char **pdev) 87 89 { 88 90 fdisk_t *fdisk; … … 92 94 cap_spec_t cap; 93 95 service_id_t sid; 94 int rc;96 errno_t rc; 95 97 96 98 printf("sysinst_label_dev(): get service ID '%s'\n", dev); … … 117 119 rc = fdisk_label_create(fdev, lt_mbr); 118 120 if (rc != EOK) { 119 printf("Error creating label (%d).\n", rc);121 printf("Error creating label: %s.\n", str_error(rc)); 120 122 return rc; 121 123 } … … 125 127 rc = fdisk_part_get_max_avail(fdev, spc_pri, &cap); 126 128 if (rc != EOK) { 127 printf("Error getting available capacity (%d).\n", rc);129 printf("Error getting available capacity: %s.\n", str_error(rc)); 128 130 return rc; 129 131 } … … 141 143 142 144 /* 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) 145 146 return ENOMEM; 146 147 … … 152 153 * 153 154 * @param dev Partition device 154 * @return EOK on success or error code155 */ 156 static int sysinst_fs_mount(const char *dev)155 * @return EOK on success or an error code 156 */ 157 static errno_t sysinst_fs_mount(const char *dev) 157 158 { 158 159 task_wait_t twait; 159 160 task_exit_t texit; 160 int rc;161 errno_t rc; 161 162 int trc; 162 163 … … 191 192 /** Copy boot files. 192 193 * 193 * @return EOK on success or error code194 */ 195 static int sysinst_copy_boot_files(void)194 * @return EOK on success or an error code 195 */ 196 static errno_t sysinst_copy_boot_files(void) 196 197 { 197 198 task_wait_t twait; 198 199 task_exit_t texit; 199 int rc;200 errno_t rc; 200 201 int trc; 201 202 … … 258 259 * 259 260 * @param devp Disk device 260 * @return EOK on success or error code261 */ 262 static int sysinst_copy_boot_blocks(const char *devp)261 * @return EOK on success or an error code 262 */ 263 static errno_t sysinst_copy_boot_blocks(const char *devp) 263 264 { 264 265 void *boot_img; … … 272 273 aoff64_t core_blocks; 273 274 grub_boot_blocklist_t *first_bl, *bl; 274 int rc;275 errno_t rc; 275 276 276 277 printf("sysinst_copy_boot_blocks: Read boot block image.\n"); … … 353 354 * 354 355 * @param dev Device to install to. 355 * @return EOK on success or error code356 */ 357 static int sysinst_install(const char *dev)358 { 359 int rc;356 * @return EOK on success or an error code 357 */ 358 static errno_t sysinst_install(const char *dev) 359 { 360 errno_t rc; 360 361 char *pdev; 361 362
Note:
See TracChangeset
for help on using the changeset viewer.