unknown_command(c);
break;
case 'b':
- if (disklabel == SGI_LABEL) {
- printf(_("\nThe current boot file is: %s\n"),
- sgi_get_bootfile());
- if (read_chars(_("Please enter the name of the "
- "new boot file: ")) == '\n')
- printf(_("Boot file unchanged\n"));
- else
- sgi_set_bootfile(line_ptr);
- } else if (disklabel == DOS_LABEL) {
+ if (disklabel == SGI_LABEL)
+ sgi_set_bootfile();
+ else if (disklabel == DOS_LABEL) {
disklabel = OSF_LABEL;
bsd_command_prompt();
disklabel = DOS_LABEL;
return 0; /* filename did not change */
}
-const char *
-sgi_get_bootfile(void) {
- return (char *) sgilabel->boot_file;
-}
-
void
-sgi_set_bootfile(const char* aFile) {
+sgi_set_bootfile(void)
+{
+ printf(_("\nThe current boot file is: %s\n"), sgilabel->boot_file);
+ if (read_chars(_("Please enter the name of the new boot file: ")) == '\n') {
+ printf(_("Boot file unchanged\n"));
+ return;
+ }
- if (sgi_check_bootfile(aFile)) {
+ if (sgi_check_bootfile(line_ptr)) {
size_t i = 0;
while (i < 16) {
- if ((aFile[i] != '\n') /* in principle caught again by next line */
- && (strlen(aFile) > i))
- sgilabel->boot_file[i] = aFile[i];
+ if ((line_ptr[i] != '\n') /* in principle caught again by next line */
+ && (strlen(line_ptr) > i))
+ sgilabel->boot_file[i] = line_ptr[i];
else
sgilabel->boot_file[i] = 0;
i++;
extern void sgi_set_swappartition( int i );
extern int sgi_get_bootpartition( void );
extern int sgi_get_swappartition( void );
-extern void sgi_set_bootfile( const char* aFile );
-extern const char *sgi_get_bootfile( void );
+extern void sgi_set_bootfile(void);
#endif /* FDISK_SGI_LABEL_H */