lspci.c revision d65680efa46fa49e8bf14e67b29b782510ff934c
/* -*- 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
/*
* Sun GPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any software where
* a choice of GPL license versions is made available with the language indicating
* that GPLv2 or any later version may be used, or where a choice of which version
* of the GPL is applied is otherwise unspecified.
*/
#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
}