[BACK]Return to disks.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.sbin / sysinst

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.sbin/sysinst/disks.c between version 1.4.4.5 and 1.5

version 1.4.4.5, 2015/05/14 07:58:49 version 1.5, 2014/08/19 13:26:27
Line 106  static int foundsysvbfs(struct data *, s
Line 106  static int foundsysvbfs(struct data *, s
 #endif  #endif
 static int fsck_preen(const char *, int, const char *);  static int fsck_preen(const char *, int, const char *);
 static void fixsb(const char *, const char *, char);  static void fixsb(const char *, const char *, char);
 static bool is_gpt(const char *);  static int is_gpt(const char *);
 static int incoregpt(pm_devs_t *, partinfo *);  static int incoregpt(pm_devs_t *, partinfo *);
   
 #ifndef DISK_NAMES  #ifndef DISK_NAMES
Line 576  find_disks(const char *doingwhat)
Line 576  find_disks(const char *doingwhat)
         return numdisks;          return numdisks;
 }  }
   
   
 void  void
 label_read(void)  label_read(void)
 {  {
         check_available_binaries();  
   
         /* Get existing/default label */          /* Get existing/default label */
         memset(&pm->oldlabel, 0, sizeof pm->oldlabel);          memset(&pm->oldlabel, 0, sizeof pm->oldlabel);
         if (!have_gpt || !pm->gpt)          if (! pm->gpt)
                 incorelabel(pm->diskdev, pm->oldlabel);                  incorelabel(pm->diskdev, pm->oldlabel);
         else          else
                 incoregpt(pm, pm->oldlabel);                  incoregpt(pm, pm->oldlabel);
Line 654  fmt_fspart(menudesc *m, int ptn, void *a
Line 651  fmt_fspart(menudesc *m, int ptn, void *a
 int  int
 write_disklabel (void)  write_disklabel (void)
 {  {
         int rv = 0;  
   
 #ifdef DISKLABEL_CMD  #ifdef DISKLABEL_CMD
         /* disklabel the disk */          /* disklabel the disk */
         rv = run_program(RUN_DISPLAY, "%s -f /tmp/disktab %s '%s'",          return run_program(RUN_DISPLAY, "%s -f /tmp/disktab %s '%s'",
             DISKLABEL_CMD, pm->diskdev, pm->bsddiskname);              DISKLABEL_CMD, pm->diskdev, pm->bsddiskname);
         if (rv == 0)  #else
                 update_wedges(pm->diskdev);          return 0;
 #endif  #endif
         return rv;  
 }  }
   
   
Line 1010  foundffs(struct data *list, size_t num)
Line 1005  foundffs(struct data *list, size_t num)
         error = target_mount("", list[0].u.s_val, ' '-'a', list[1].u.s_val);          error = target_mount("", list[0].u.s_val, ' '-'a', list[1].u.s_val);
         if (error != 0) {          if (error != 0) {
                 msg_display(MSG_mount_failed, list[0].u.s_val);                  msg_display(MSG_mount_failed, list[0].u.s_val);
                 if (!ask_noyes(NULL))                  process_menu(MENU_noyes, NULL);
                   if (!yesno)
                         return error;                          return error;
         }          }
         return 0;          return 0;
Line 1060  fsck_preen(const char *disk, int ptn, co
Line 1056  fsck_preen(const char *disk, int ptn, co
         free(prog);          free(prog);
         if (error != 0) {          if (error != 0) {
                 msg_display(MSG_badfs, disk, ptn, error);                  msg_display(MSG_badfs, disk, ptn, error);
                 if (ask_noyes(NULL))                  process_menu(MENU_noyes, NULL);
                   if (yesno)
                         error = 0;                          error = 0;
                 /* XXX at this point maybe we should run a full fsck? */                  /* XXX at this point maybe we should run a full fsck? */
         }          }
Line 1201  mount_disks(void)
Line 1198  mount_disks(void)
 }  }
   
 int  int
 set_swap_if_low_ram(const char *disk, partinfo *pp) {  
         if (get_ramsize() <= 32)  
                 return set_swap(disk, pp);  
         return 0;  
 }  
   
 int  
 set_swap(const char *disk, partinfo *pp)  set_swap(const char *disk, partinfo *pp)
 {  {
         int i;          int i;
Line 1466  incoregpt(pm_devs_t *pm_cur, partinfo *l
Line 1456  incoregpt(pm_devs_t *pm_cur, partinfo *l
         return 0;          return 0;
 }  }
   
 static bool  static int
 is_gpt(const char *dev)  is_gpt(const char *dev)
 {  {
         check_available_binaries();          return ! run_program(RUN_SILENT | RUN_ERROR_OK,
   
         if (!have_gpt)  
                 return false;  
   
         return !run_program(RUN_SILENT | RUN_ERROR_OK,  
                 "sh -c 'gpt show %s |grep -e Pri\\ GPT\\ table'", dev);                  "sh -c 'gpt show %s |grep -e Pri\\ GPT\\ table'", dev);
 }  }

Legend:
Removed from v.1.4.4.5  
changed lines
  Added in v.1.5

CVSweb <webmaster@jp.NetBSD.org>