VirtualBox

Changeset 63189 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 9, 2016 2:03:17 AM (8 years ago)
Author:
vboxsync
Message:

log-vbox.cpp: RTLogDefaultInit - add NetBSD support for parsing
command line. Reuse existing FreeBSD code and adapt for NetBSD.

From Kamil Rytarowski.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/VBox/log-vbox.cpp

    r62895 r63189  
    132132# elif defined(RT_OS_LINUX)
    133133#  include <unistd.h>
    134 # elif defined(RT_OS_FREEBSD)
     134# elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
    135135#  include <sys/param.h>
    136136#  include <sys/sysctl.h>
    137 #  include <sys/user.h>
     137#  if defined(RT_OS_FREEBSD)
     138#    include <sys/user.h>
     139#  endif
    138140#  include <stdlib.h>
    139141#  include <unistd.h>
     
    648650        }
    649651
    650 #  elif defined(RT_OS_FREEBSD)
     652#  elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
    651653        /* Retrieve the required length first */
    652654        int aiName[4];
     655#  if defined(RT_OS_FREEBSD)
    653656        aiName[0] = CTL_KERN;
    654657        aiName[1] = KERN_PROC;
    655658        aiName[2] = KERN_PROC_ARGS;     /* Introduced in FreeBSD 4.0 */
    656659        aiName[3] = getpid();
     660#  elif defined(RT_OS_NETBSD)
     661        aiName[0] = CTL_KERN;
     662        aiName[1] = KERN_PROC_ARGS;
     663        aiName[2] = getpid();
     664        aiName[3] = KERN_PROC_ARGV;
     665#  endif
    657666        size_t cchArgs = 0;
    658667        int rcBSD = sysctl(aiName, RT_ELEMENTS(aiName), NULL, &cchArgs, NULL, 0);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette