Revision ab51b1d5 vl.c

b/vl.c
3637 3637
        default_sdcard = 0;
3638 3638
    }
3639 3639

  
3640
    if (is_daemonized()) {
3641
        /* According to documentation and historically, -nographic redirects
3642
         * serial port, parallel port and monitor to stdio, which does not work
3643
         * with -daemonize.  We can redirect these to null instead, but since
3644
         * -nographic is legacy, let's just error out.
3645
         * We disallow -nographic only if all other ports are not redirected
3646
         * explicitly, to not break existing legacy setups which uses
3647
         * -nographic _and_ redirects all ports explicitly - this is valid
3648
         * usage, -nographic is just a no-op in this case.
3649
         */
3650
        if (display_type == DT_NOGRAPHIC
3651
            && (default_parallel || default_serial
3652
                || default_monitor || default_virtcon)) {
3653
            fprintf(stderr, "-nographic can not be used with -daemonize\n");
3654
            exit(1);
3655
        }
3656
#ifdef CONFIG_CURSES
3657
        if (display_type == DT_CURSES) {
3658
            fprintf(stderr, "curses display can not be used with -daemonize\n");
3659
            exit(1);
3660
        }
3661
#endif
3662
    }
3663

  
3640 3664
    if (display_type == DT_NOGRAPHIC) {
3641 3665
        if (default_parallel)
3642 3666
            add_device_config(DEV_PARALLEL, "null");
......
3903 3927
        break;
3904 3928
#if defined(CONFIG_CURSES)
3905 3929
    case DT_CURSES:
3906
        if (!is_daemonized()) {
3907
            curses_display_init(ds, full_screen);
3908
        }
3930
        curses_display_init(ds, full_screen);
3909 3931
        break;
3910 3932
#endif
3911 3933
#if defined(CONFIG_SDL)

Also available in: Unified diff