Chameleon

Chameleon Commit Details

Date:2010-01-29 00:13:20 (14 years 2 months ago)
Author:Rekursor
Commit:41
Parents: 40
Message: Last change was not working 100% because we NEED to keep an absolute path spec for DSDT.aml while also permitting the automatic dsdt detection to work. Fixed now.
Changes:
M/trunk/i386/libsaio/dsdt_patcher.c

File differences

trunk/i386/libsaio/dsdt_patcher.c
7373
7474
7575
76
76
7777
7878
79
79
8080
81
82
83
8184
8285
83
86
87
88
89
90
91
92
93
94
95
96
97
8498
99
85100
86101
102
87103
88104
89105
......
205221
206222
207223
208
209224
210
211
212225
213226
214
215
216
217227
218
228
219229
220230
221
222231
223232
224233
return NULL;
}
void *loadACPITable (const char *filename)
void *loadACPITable ()
{
void *tableAddr;
int fd;
int fd = -1;
char dirspec[512];
const char * const filename = "DSDT.aml";
const char * overriden_pathname=NULL;
int len=0;
// Check booting partition
sprintf(dirspec,"/%s",filename); // Rek: add the '/' because filename contains no path !
// Rek: if user specified a full path name then take it in consideration
if (getValueForKey(kDSDT, &overriden_pathname, &len,
&bootInfo->bootConfig))
{
sprintf(dirspec, "%s", overriden_pathname); // start searching root
//printf("Using custom DSDT path %s\n", dirspec);
//getc();
}
else
sprintf(dirspec, "/%s", filename); // start searching root
fd=open (dirspec,0);
if (fd<0)
{// Check Extra on booting partition
//verbose("Searching for DSDT.aml file ...\n");
sprintf(dirspec,"/Extra/%s",filename);
fd=open (dirspec,0);
if (fd<0)
{
int version;
void *new_dsdt;
const char *dsdt_filename;
int fd;
int len;
bool drop_ssdt;
if (!getValueForKey(kDSDT, &dsdt_filename, &len, &bootInfo->bootConfig))
dsdt_filename="DSDT.aml";
// Load replacement DSDT
new_dsdt=loadACPITable(dsdt_filename);
new_dsdt=loadACPITable();
if (!new_dsdt)
{
close(fd);
return setupAcpiNoMod();
}

Archive Download the corresponding diff file

Revision: 41