Print this page
3788 /etc/bootrc is defunct and should be removed


 324                         return (1);
 325                 }
 326 
 327                 opts.o_target = 1;
 328         }
 329 
 330         if ((opts.o_ancestors || opts.o_children) && (!opts.o_target)) {
 331                 (void) fprintf(stderr, "%s: options require a device path\n",
 332                     opts.o_progname);
 333                 return (1);
 334         }
 335 
 336         if (opts.o_target) {
 337                 prtconf_devinfo();
 338                 return (0);
 339         }
 340 
 341         ret = sysinfo(SI_HW_PROVIDER, hw_provider, sizeof (hw_provider));
 342         /*
 343          * If 0 bytes are returned (the system returns '1', for the \0),
 344          * we're probably on x86, and there has been no si-hw-provider
 345          * set in /etc/bootrc, default to Oracle.
 346          */
 347         if (ret <= 1) {
 348                 (void) strncpy(hw_provider, "Oracle Corporation",
 349                     sizeof (hw_provider));
 350         }
 351         (void) printf("System Configuration:  %s  %s\n", hw_provider,
 352             opts.o_uts.machine);
 353 
 354         pagesize = sysconf(_SC_PAGESIZE);
 355         npages = sysconf(_SC_PHYS_PAGES);
 356         (void) printf("Memory size: ");
 357         if (pagesize == -1 || npages == -1)
 358                 (void) printf("unable to determine\n");
 359         else {
 360                 const int64_t kbyte = 1024;
 361                 const int64_t mbyte = 1024 * 1024;
 362                 int64_t ii = (int64_t)pagesize * npages;
 363 
 364                 if (ii >= mbyte)
 365                         (void) printf("%ld Megabytes\n",


 324                         return (1);
 325                 }
 326 
 327                 opts.o_target = 1;
 328         }
 329 
 330         if ((opts.o_ancestors || opts.o_children) && (!opts.o_target)) {
 331                 (void) fprintf(stderr, "%s: options require a device path\n",
 332                     opts.o_progname);
 333                 return (1);
 334         }
 335 
 336         if (opts.o_target) {
 337                 prtconf_devinfo();
 338                 return (0);
 339         }
 340 
 341         ret = sysinfo(SI_HW_PROVIDER, hw_provider, sizeof (hw_provider));
 342         /*
 343          * If 0 bytes are returned (the system returns '1', for the \0),
 344          * we're probably on x86, default to Oracle.

 345          */
 346         if (ret <= 1) {
 347                 (void) strncpy(hw_provider, "Oracle Corporation",
 348                     sizeof (hw_provider));
 349         }
 350         (void) printf("System Configuration:  %s  %s\n", hw_provider,
 351             opts.o_uts.machine);
 352 
 353         pagesize = sysconf(_SC_PAGESIZE);
 354         npages = sysconf(_SC_PHYS_PAGES);
 355         (void) printf("Memory size: ");
 356         if (pagesize == -1 || npages == -1)
 357                 (void) printf("unable to determine\n");
 358         else {
 359                 const int64_t kbyte = 1024;
 360                 const int64_t mbyte = 1024 * 1024;
 361                 int64_t ii = (int64_t)pagesize * npages;
 362 
 363                 if (ii >= mbyte)
 364                         (void) printf("%ld Megabytes\n",