Subversion Repositories Kolibri OS

Rev

Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1498 Rev 2216
Line 6... Line 6...
6
 
6
 
7
/******************************************************************************
7
/******************************************************************************
8
 *
8
 *
9
 * 1. Copyright Notice
9
 * 1. Copyright Notice
10
 *
10
 *
11
 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
11
 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
12
 * All rights reserved.
12
 * All rights reserved.
13
 *
13
 *
14
 * 2. License
14
 * 2. License
15
 *
15
 *
Line 121... Line 121...
121
 
121
 
122
 
122
 
Line 123... Line -...
123
#define _COMPONENT          ACPI_UTILITIES
-
 
124
        ACPI_MODULE_NAME    ("utids")
-
 
125
 
-
 
126
/* Local prototypes */
-
 
127
 
-
 
128
static void
-
 
129
AcpiUtCopyIdString (
-
 
130
    char                    *Destination,
-
 
131
    char                    *Source);
-
 
132
 
-
 
133
 
-
 
134
/*******************************************************************************
-
 
135
 *
-
 
136
 * FUNCTION:    AcpiUtCopyIdString
-
 
137
 *
-
 
138
 * PARAMETERS:  Destination         - Where to copy the string
-
 
139
 *              Source              - Source string
-
 
140
 *
-
 
141
 * RETURN:      None
-
 
142
 *
-
 
143
 * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods.
-
 
144
 *              Performs removal of a leading asterisk if present -- workaround
-
 
145
 *              for a known issue on a bunch of machines.
-
 
146
 *
-
 
147
 ******************************************************************************/
-
 
148
 
-
 
149
static void
-
 
150
AcpiUtCopyIdString (
-
 
151
    char                    *Destination,
-
 
152
    char                    *Source)
-
 
153
{
-
 
154
 
-
 
155
    /*
-
 
156
     * Workaround for ID strings that have a leading asterisk. This construct
-
 
157
     * is not allowed by the ACPI specification  (ID strings must be
-
 
158
     * alphanumeric), but enough existing machines have this embedded in their
-
 
159
     * ID strings that the following code is useful.
-
 
160
     */
-
 
161
    if (*Source == '*')
-
 
162
    {
-
 
163
        Source++;
-
 
164
    }
-
 
165
 
-
 
166
    /* Do the actual copy */
-
 
167
 
-
 
Line 168... Line 123...
168
    ACPI_STRCPY (Destination, Source);
123
#define _COMPONENT          ACPI_UTILITIES
169
}
124
        ACPI_MODULE_NAME    ("utids")
170
 
125
 
171
 
126
 
Line 238... Line 193...
238
    {
193
    {
239
        AcpiExEisaIdToString (Hid->String, ObjDesc->Integer.Value);
194
        AcpiExEisaIdToString (Hid->String, ObjDesc->Integer.Value);
240
    }
195
    }
241
    else
196
    else
242
    {
197
    {
243
        AcpiUtCopyIdString (Hid->String, ObjDesc->String.Pointer);
198
        ACPI_STRCPY (Hid->String, ObjDesc->String.Pointer);
244
    }
199
    }
Line 245... Line 200...
245
 
200
 
246
    Hid->Length = Length;
201
    Hid->Length = Length;
Line 325... Line 280...
325
    {
280
    {
326
        AcpiExIntegerToString (Uid->String, ObjDesc->Integer.Value);
281
        AcpiExIntegerToString (Uid->String, ObjDesc->Integer.Value);
327
    }
282
    }
328
    else
283
    else
329
    {
284
    {
330
        AcpiUtCopyIdString (Uid->String, ObjDesc->String.Pointer);
285
        ACPI_STRCPY (Uid->String, ObjDesc->String.Pointer);
331
    }
286
    }
Line 332... Line 287...
332
 
287
 
333
    Uid->Length = Length;
288
    Uid->Length = Length;
Line 469... Line 424...
469
        }
424
        }
470
        else /* ACPI_TYPE_STRING */
425
        else /* ACPI_TYPE_STRING */
471
        {
426
        {
472
            /* Copy the String CID from the returned object */
427
            /* Copy the String CID from the returned object */
Line 473... Line 428...
473
 
428
 
474
            AcpiUtCopyIdString (NextIdString, CidObjects[i]->String.Pointer);
429
            ACPI_STRCPY (NextIdString, CidObjects[i]->String.Pointer);
475
            Length = CidObjects[i]->String.Length + 1;
430
            Length = CidObjects[i]->String.Length + 1;
Line 476... Line 431...
476
        }
431
        }
477
 
432