| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: defs.h,v 1.57 2020/03/16 06:48:17 martin Exp $ */ | | 1 | /* $NetBSD: defs.h,v 1.58 2020/04/22 23:43:12 joerg Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright 1997 Piermont Information Systems Inc. | | 4 | * Copyright 1997 Piermont Information Systems Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -350,51 +350,51 @@ struct single_part_fs_edit { | | | @@ -350,51 +350,51 @@ struct single_part_fs_edit { |
350 | | | 350 | |
351 | /* | | 351 | /* |
352 | * Description of a full target installation, all partitions and | | 352 | * Description of a full target installation, all partitions and |
353 | * devices (may be accross several struct pm_devs / disks). | | 353 | * devices (may be accross several struct pm_devs / disks). |
354 | */ | | 354 | */ |
355 | struct install_partition_desc { | | 355 | struct install_partition_desc { |
356 | size_t num; /* how many entries in infos */ | | 356 | size_t num; /* how many entries in infos */ |
357 | struct part_usage_info *infos; /* individual partitions */ | | 357 | struct part_usage_info *infos; /* individual partitions */ |
358 | bool cur_system; /* target is the life system */ | | 358 | bool cur_system; /* target is the life system */ |
359 | }; | | 359 | }; |
360 | | | 360 | |
361 | /* variables */ | | 361 | /* variables */ |
362 | | | 362 | |
363 | int debug; /* set by -D option */ | | 363 | extern int debug; /* set by -D option */ |
364 | | | 364 | |
365 | char machine[SSTRSIZE]; | | 365 | extern char machine[SSTRSIZE]; |
366 | | | 366 | |
367 | int ignorerror; | | 367 | extern int ignorerror; |
368 | int ttysig_ignore; | | 368 | extern int ttysig_ignore; |
369 | pid_t ttysig_forward; | | 369 | extern pid_t ttysig_forward; |
370 | uint sizemult; | | 370 | extern uint sizemult; |
371 | extern const char *multname; | | 371 | extern const char *multname; |
372 | extern const char *err_outofmem; | | 372 | extern const char *err_outofmem; |
373 | int partman_go; /* run extended partition manager */ | | 373 | extern int partman_go; /* run extended partition manager */ |
374 | | | 374 | |
375 | /* logging variables */ | | 375 | /* logging variables */ |
376 | | | 376 | |
377 | FILE *logfp; | | 377 | extern FILE *logfp; |
378 | FILE *script; | | 378 | extern FILE *script; |
379 | | | 379 | |
380 | #define MAX_DISKS 15 | | 380 | #define MAX_DISKS 15 |
381 | | | 381 | |
382 | daddr_t root_limit; /* BIOS (etc) read limit */ | | 382 | extern daddr_t root_limit; /* BIOS (etc) read limit */ |
383 | | | 383 | |
384 | enum SHRED_T { SHRED_NONE=0, SHRED_ZEROS, SHRED_RANDOM }; | | 384 | enum SHRED_T { SHRED_NONE=0, SHRED_ZEROS, SHRED_RANDOM }; |
385 | | | 385 | |
386 | /* All information that is unique for each drive */ | | 386 | /* All information that is unique for each drive */ |
387 | SLIST_HEAD(pm_head_t, pm_devs) pm_head; | | 387 | extern SLIST_HEAD(pm_head_t, pm_devs) pm_head; |
388 | | | 388 | |
389 | struct pm_devs { | | 389 | struct pm_devs { |
390 | /* | | 390 | /* |
391 | * If device is blocked (e.g. part of a raid) | | 391 | * If device is blocked (e.g. part of a raid) |
392 | * this is a pointers to the parent dev | | 392 | * this is a pointers to the parent dev |
393 | */ | | 393 | */ |
394 | void *refdev; | | 394 | void *refdev; |
395 | | | 395 | |
396 | char diskdev[SSTRSIZE]; /* Actual name of the disk. */ | | 396 | char diskdev[SSTRSIZE]; /* Actual name of the disk. */ |
397 | char diskdev_descr[STRSIZE]; /* e.g. IDENTIFY result */ | | 397 | char diskdev_descr[STRSIZE]; /* e.g. IDENTIFY result */ |
398 | | | 398 | |
399 | /* | | 399 | /* |
400 | * What the disk layout should look like. | | 400 | * What the disk layout should look like. |
| @@ -443,44 +443,44 @@ struct pm_devs { | | | @@ -443,44 +443,44 @@ struct pm_devs { |
443 | * entries is parts->num_part) may actually be mounted (temporarily) | | 443 | * entries is parts->num_part) may actually be mounted (temporarily) |
444 | * somewhere, e.g. to access a vnd device on them. This list has | | 444 | * somewhere, e.g. to access a vnd device on them. This list has |
445 | * a pointer to the current mount point (strdup()'d) if mounted, | | 445 | * a pointer to the current mount point (strdup()'d) if mounted, |
446 | * or NULL if not. | | 446 | * or NULL if not. |
447 | */ | | 447 | */ |
448 | char **mounted; | | 448 | char **mounted; |
449 | | | 449 | |
450 | bool unsaved; /* Flag indicating to partman that device need saving */ | | 450 | bool unsaved; /* Flag indicating to partman that device need saving */ |
451 | bool found; /* Flag to delete unplugged and unconfigured devices */ | | 451 | bool found; /* Flag to delete unplugged and unconfigured devices */ |
452 | int blocked; /* Device is busy and cannot be changed */ | | 452 | int blocked; /* Device is busy and cannot be changed */ |
453 | | | 453 | |
454 | SLIST_ENTRY(pm_devs) l; | | 454 | SLIST_ENTRY(pm_devs) l; |
455 | }; | | 455 | }; |
456 | struct pm_devs *pm; /* Pointer to current device with which we work */ | | 456 | extern struct pm_devs *pm; /* Pointer to current device with which we work */ |
457 | struct pm_devs *pm_new; /* Pointer for next allocating device in find_disks() */ | | 457 | extern struct pm_devs *pm_new; /* Pointer for next allocating device in find_disks() */ |
458 | | | 458 | |
459 | /* Generic structure for partman */ | | 459 | /* Generic structure for partman */ |
460 | struct part_entry { | | 460 | struct part_entry { |
461 | part_id id; | | 461 | part_id id; |
462 | struct disk_partitions *parts; | | 462 | struct disk_partitions *parts; |
463 | void *dev_ptr; | | 463 | void *dev_ptr; |
464 | size_t index; /* e.g. if PM_RAID: this is raids[index] */ | | 464 | size_t index; /* e.g. if PM_RAID: this is raids[index] */ |
465 | int dev_ptr_delta; | | 465 | int dev_ptr_delta; |
466 | char fullname[SSTRSIZE]; | | 466 | char fullname[SSTRSIZE]; |
467 | enum {PM_DISK=1, PM_PART, PM_SPEC, | | 467 | enum {PM_DISK=1, PM_PART, PM_SPEC, |
468 | PM_RAID, PM_CGD, PM_VND, PM_LVM, PM_LVMLV} type; | | 468 | PM_RAID, PM_CGD, PM_VND, PM_LVM, PM_LVMLV} type; |
469 | }; | | 469 | }; |
470 | | | 470 | |
471 | /* Relative file name for storing a distribution. */ | | 471 | /* Relative file name for storing a distribution. */ |
472 | char xfer_dir[STRSIZE]; | | 472 | extern char xfer_dir[STRSIZE]; |
473 | int clean_xfer_dir; | | 473 | extern int clean_xfer_dir; |
474 | | | 474 | |
475 | #if !defined(SYSINST_FTP_HOST) | | 475 | #if !defined(SYSINST_FTP_HOST) |
476 | #define SYSINST_FTP_HOST "ftp.NetBSD.org" | | 476 | #define SYSINST_FTP_HOST "ftp.NetBSD.org" |
477 | #endif | | 477 | #endif |
478 | | | 478 | |
479 | #if !defined(SYSINST_HTTP_HOST) | | 479 | #if !defined(SYSINST_HTTP_HOST) |
480 | #define SYSINST_HTTP_HOST "cdn.NetBSD.org" | | 480 | #define SYSINST_HTTP_HOST "cdn.NetBSD.org" |
481 | #endif | | 481 | #endif |
482 | | | 482 | |
483 | #if !defined(SYSINST_FTP_DIR) | | 483 | #if !defined(SYSINST_FTP_DIR) |
484 | #if defined(NETBSD_OFFICIAL_RELEASE) | | 484 | #if defined(NETBSD_OFFICIAL_RELEASE) |
485 | #define SYSINST_FTP_DIR "pub/NetBSD/NetBSD-" REL | | 485 | #define SYSINST_FTP_DIR "pub/NetBSD/NetBSD-" REL |
486 | #elif defined(REL_PATH) | | 486 | #elif defined(REL_PATH) |
| @@ -520,83 +520,83 @@ int clean_xfer_dir; | | | @@ -520,83 +520,83 @@ int clean_xfer_dir; |
520 | #endif | | 520 | #endif |
521 | | | 521 | |
522 | #ifndef SETS_TAR_SUFF | | 522 | #ifndef SETS_TAR_SUFF |
523 | #define SETS_TAR_SUFF "tgz" | | 523 | #define SETS_TAR_SUFF "tgz" |
524 | #endif | | 524 | #endif |
525 | | | 525 | |
526 | #ifdef USING_PAXASTAR | | 526 | #ifdef USING_PAXASTAR |
527 | #define TAR_EXTRACT_FLAGS "-xhepf" | | 527 | #define TAR_EXTRACT_FLAGS "-xhepf" |
528 | #else | | 528 | #else |
529 | #define TAR_EXTRACT_FLAGS "-xpf" | | 529 | #define TAR_EXTRACT_FLAGS "-xpf" |
530 | #endif | | 530 | #endif |
531 | | | 531 | |
532 | /* Abs. path we extract binary sets from */ | | 532 | /* Abs. path we extract binary sets from */ |
533 | char ext_dir_bin[STRSIZE]; | | 533 | extern char ext_dir_bin[STRSIZE]; |
534 | | | 534 | |
535 | /* Abs. path we extract source sets from */ | | 535 | /* Abs. path we extract source sets from */ |
536 | char ext_dir_src[STRSIZE]; | | 536 | extern char ext_dir_src[STRSIZE]; |
537 | | | 537 | |
538 | /* Abs. path we extract pkgsrc from */ | | 538 | /* Abs. path we extract pkgsrc from */ |
539 | char ext_dir_pkgsrc[STRSIZE]; | | 539 | extern char ext_dir_pkgsrc[STRSIZE]; |
540 | | | 540 | |
541 | /* Place we look for binary sets in all fs types */ | | 541 | /* Place we look for binary sets in all fs types */ |
542 | char set_dir_bin[STRSIZE]; | | 542 | extern char set_dir_bin[STRSIZE]; |
543 | | | 543 | |
544 | /* Place we look for source sets in all fs types */ | | 544 | /* Place we look for source sets in all fs types */ |
545 | char set_dir_src[STRSIZE]; | | 545 | extern char set_dir_src[STRSIZE]; |
546 | | | 546 | |
547 | /* Place we look for pkgs in all fs types */ | | 547 | /* Place we look for pkgs in all fs types */ |
548 | char pkg_dir[STRSIZE]; | | 548 | extern char pkg_dir[STRSIZE]; |
549 | | | 549 | |
550 | /* Place we look for pkgsrc in all fs types */ | | 550 | /* Place we look for pkgsrc in all fs types */ |
551 | char pkgsrc_dir[STRSIZE]; | | 551 | extern char pkgsrc_dir[STRSIZE]; |
552 | | | 552 | |
553 | /* User shell */ | | 553 | /* User shell */ |
554 | const char *ushell; | | 554 | extern const char *ushell; |
555 | | | 555 | |
556 | #define XFER_FTP 0 | | 556 | #define XFER_FTP 0 |
557 | #define XFER_HTTP 1 | | 557 | #define XFER_HTTP 1 |
558 | #define XFER_MAX XFER_HTTP | | 558 | #define XFER_MAX XFER_HTTP |
559 | | | 559 | |
560 | struct ftpinfo { | | 560 | struct ftpinfo { |
561 | char xfer_host[XFER_MAX+1][STRSIZE]; | | 561 | char xfer_host[XFER_MAX+1][STRSIZE]; |
562 | char dir[STRSIZE] ; | | 562 | char dir[STRSIZE] ; |
563 | char user[SSTRSIZE]; | | 563 | char user[SSTRSIZE]; |
564 | char pass[STRSIZE]; | | 564 | char pass[STRSIZE]; |
565 | char proxy[STRSIZE]; | | 565 | char proxy[STRSIZE]; |
566 | unsigned int xfer; /* XFER_FTP for "ftp" or XFER_HTTP for "http" */ | | 566 | unsigned int xfer; /* XFER_FTP for "ftp" or XFER_HTTP for "http" */ |
567 | }; | | 567 | }; |
568 | | | 568 | |
569 | /* use the same struct for sets ftp and to build pkgpath */ | | 569 | /* use the same struct for sets ftp and to build pkgpath */ |
570 | struct ftpinfo ftp, pkg, pkgsrc; | | 570 | extern struct ftpinfo ftp, pkg, pkgsrc; |
571 | | | 571 | |
572 | int (*fetch_fn)(const char *); | | 572 | extern int (*fetch_fn)(const char *); |
573 | char nfs_host[STRSIZE]; | | 573 | extern char nfs_host[STRSIZE]; |
574 | char nfs_dir[STRSIZE]; | | 574 | extern char nfs_dir[STRSIZE]; |
575 | | | 575 | |
576 | char cdrom_dev[SSTRSIZE]; /* Typically "cd0a" */ | | 576 | extern char cdrom_dev[SSTRSIZE]; /* Typically "cd0a" */ |
577 | char fd_dev[SSTRSIZE]; /* Typically "/dev/fd0a" */ | | 577 | extern char fd_dev[SSTRSIZE]; /* Typically "/dev/fd0a" */ |
578 | const char *fd_type; /* "msdos", "ffs" or maybe "ados" */ | | 578 | extern const char *fd_type; /* "msdos", "ffs" or maybe "ados" */ |
579 | | | 579 | |
580 | char localfs_dev[SSTRSIZE]; | | 580 | extern char localfs_dev[SSTRSIZE]; |
581 | char localfs_fs[SSTRSIZE]; | | 581 | extern char localfs_fs[SSTRSIZE]; |
582 | char localfs_dir[STRSIZE]; | | 582 | extern char localfs_dir[STRSIZE]; |
583 | | | 583 | |
584 | char targetroot_mnt[SSTRSIZE]; | | 584 | extern char targetroot_mnt[SSTRSIZE]; |
585 | | | 585 | |
586 | int mnt2_mounted; | | 586 | extern int mnt2_mounted; |
587 | | | 587 | |
588 | char dist_postfix[SSTRSIZE]; | | 588 | extern char dist_postfix[SSTRSIZE]; |
589 | char dist_tgz_postfix[SSTRSIZE]; | | 589 | extern char dist_tgz_postfix[SSTRSIZE]; |
590 | | | 590 | |
591 | /* needed prototypes */ | | 591 | /* needed prototypes */ |
592 | void set_menu_numopts(int, int); | | 592 | void set_menu_numopts(int, int); |
593 | void remove_color_options(void); | | 593 | void remove_color_options(void); |
594 | void remove_raid_options(void); | | 594 | void remove_raid_options(void); |
595 | void remove_lvm_options(void); | | 595 | void remove_lvm_options(void); |
596 | void remove_cgd_options(void); | | 596 | void remove_cgd_options(void); |
597 | | | 597 | |
598 | /* Machine dependent functions .... */ | | 598 | /* Machine dependent functions .... */ |
599 | void md_init(void); | | 599 | void md_init(void); |
600 | void md_init_set_status(int); /* SFLAG_foo */ | | 600 | void md_init_set_status(int); /* SFLAG_foo */ |
601 | | | 601 | |
602 | /* MD functions if user selects install - in order called */ | | 602 | /* MD functions if user selects install - in order called */ |
| @@ -941,20 +941,20 @@ int move_aout_libs(void); | | | @@ -941,20 +941,20 @@ int move_aout_libs(void); |
941 | void get_kb_encoding(void); | | 941 | void get_kb_encoding(void); |
942 | void save_kb_encoding(void); | | 942 | void save_kb_encoding(void); |
943 | #else | | 943 | #else |
944 | #define get_kb_encoding() | | 944 | #define get_kb_encoding() |
945 | #define save_kb_encoding() | | 945 | #define save_kb_encoding() |
946 | #endif | | 946 | #endif |
947 | | | 947 | |
948 | /* from configmenu.c */ | | 948 | /* from configmenu.c */ |
949 | void do_configmenu(struct install_partition_desc*); | | 949 | void do_configmenu(struct install_partition_desc*); |
950 | | | 950 | |
951 | /* from checkrc.c */ | | 951 | /* from checkrc.c */ |
952 | int check_rcvar(const char *); | | 952 | int check_rcvar(const char *); |
953 | int check_rcdefault(const char *); | | 953 | int check_rcdefault(const char *); |
954 | WINDOW *mainwin; | | 954 | extern WINDOW *mainwin; |
955 | | | 955 | |
956 | /* in menus.mi */ | | 956 | /* in menus.mi */ |
957 | void expand_all_option_texts(menudesc *menu, void *arg); | | 957 | void expand_all_option_texts(menudesc *menu, void *arg); |
958 | void resize_menu_height(menudesc *); | | 958 | void resize_menu_height(menudesc *); |
959 | | | 959 | |
960 | #endif /* _DEFS_H_ */ | | 960 | #endif /* _DEFS_H_ */ |