38f50ae4d5
* dtable.cc (build_fh_pc): Add case for FH_PROCESSFD. * fhandler.h (class fhandler_virtual): Drop bufalloc member. * fhandler_virtual.h: New header. * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor of types virt_type_t and virt_tab_t from fhandler_virtual.h. Change prototypes of format_XXX functions accordingly. (proc_tab): Drop size member info. (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate it in the format_XXX functions. * fhandler_process.cc: Reorganize global process content data into a new struct virt_tab_t. Accommodate throughout. (format_process_winexename): New function. (format_process_winpid): New function. (format_process_exename): New function. (format_process_root): New function. (format_process_cwd): New function. (format_process_cmdline): New function. (format_process_ppid): New function. (format_process_uid): New function. (format_process_pgid): New function. (format_process_sid): New function. (format_process_gid): New function. (format_process_ctty): New function. (format_process_fd): New function. * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use bufalloc. * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define bufalloc locally. * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop initialization of bufalloc. (fhandler_virtual::dup): Drop copying bufalloc.
28 lines
559 B
C
28 lines
559 B
C
/* fhandler_virtual.h: Header for virtual fhandlers
|
|
|
|
Copyright 2009 Red Hat, Inc.
|
|
|
|
This file is part of Cygwin.
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
details. */
|
|
|
|
enum virtual_ftype_t {
|
|
virt_socket = -4,
|
|
virt_pipe = -3,
|
|
virt_symlink = -2,
|
|
virt_file = -1,
|
|
virt_none = 0,
|
|
virt_directory = 1,
|
|
virt_rootdir = 2
|
|
};
|
|
|
|
struct virt_tab_t {
|
|
const char *name;
|
|
__dev32_t fhandler;
|
|
virtual_ftype_t type;
|
|
_off64_t (*format_func)(void *data, char *&);
|
|
};
|
|
|