lspci.c revision a180a41bba1d50822df23fff0099e90b86638b89
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Support for the Matrox "lspci" channel
Copyright (C) 2005 Matrox Graphics Inc.
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rdesktop.h"
#include <unistd.h>
static VCHANNEL *lspci_channel;
typedef struct _pci_device
{
} pci_device;
static pci_device current_device;
static void lspci_send(const char *output);
/* Handle one line of output from the lspci subprocess */
static RD_BOOL
{
const char *val;
char buf[1024];
{
/* Skip whitespace and second Class: occurance */
}
{
}
{
/* Sigh, there are *two* lines tagged as Device:. We
}
{
}
{
}
{
}
{
}
{
/* Blank line. Send collected information over channel */
}
else
{
}
return True;
}
/* Process one line of input from virtual channel */
static RD_BOOL
{
{
/* Send single dot to indicate end of enumeration */
lspci_send(".\n");
}
else
{
}
return True;
}
/* Process new data from the virtual channel */
static void
{
unsigned int pkglen;
char *buf;
/* str_handle_lines requires null terminated strings */
#if 0
printf("lspci recv:\n");
#endif
}
/* Initialize this module: Register the lspci channel */
lspci_init(void)
{
return (lspci_channel != NULL);
}
/* Send data to channel */
static void
lspci_send(const char *output)
{
STREAM s;
#if 0
printf("lspci send:\n");
#endif
}