mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-10-31 23:37:35 +00:00
macloader: Use a variable for device type.
Change-Id: Ice29862ad6aaa15b07d6341893b0b8f1c65152e6 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
3a73bd3f2e
commit
c7212d0365
1 changed files with 15 additions and 22 deletions
|
@ -120,6 +120,7 @@ int main() {
|
|||
}
|
||||
|
||||
if (type != NONE) {
|
||||
const char *type_str;
|
||||
struct passwd *pwd;
|
||||
int fd;
|
||||
|
||||
|
@ -134,37 +135,29 @@ int main() {
|
|||
switch(type) {
|
||||
case NONE:
|
||||
return -1;
|
||||
break;
|
||||
case MURATA:
|
||||
/* write murata to cid file */
|
||||
ALOGI("Writing murata to %s\n", CID_PATH);
|
||||
ret = fputs("murata", cidfile);
|
||||
break;
|
||||
type_str = "murata";
|
||||
break;
|
||||
case SEMCOSH:
|
||||
/* write semcosh to cid file */
|
||||
ALOGI("Writing semcosh to %s\n", CID_PATH);
|
||||
ret = fputs("semcosh", cidfile);
|
||||
break;
|
||||
type_str = "semcosh";
|
||||
break;
|
||||
case SEMCOVE:
|
||||
/* write semcove to cid file */
|
||||
ALOGI("Writing semcove to %s\n", CID_PATH);
|
||||
ret = fputs("semcove", cidfile);
|
||||
break;
|
||||
type_str = "semcove";
|
||||
break;
|
||||
case SEMCO3RD:
|
||||
ALOGI("Writing semco3rd to %s\n", CID_PATH);
|
||||
ret = fputs("semco3rd", cidfile);
|
||||
type_str = "semco3rd";
|
||||
break;
|
||||
case SEMCO:
|
||||
/* write semco to cid file */
|
||||
ALOGI("Writing semco to %s\n", CID_PATH);
|
||||
ret = fputs("semco", cidfile);
|
||||
break;
|
||||
type_str = "semco";
|
||||
break;
|
||||
case WISOL:
|
||||
ALOGI("Writing wisol to %s\n", CID_PATH);
|
||||
ret = fputs("wisol", cidfile);
|
||||
type_str = "wisol";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ALOGI("Settting wifi type to %s in %s\n", type_str, CID_PATH);
|
||||
|
||||
ret = fputs(type_str, cidfile);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "fputs() to file %s failed\n", CID_PATH);
|
||||
ALOGE("Can't write to %s\n", CID_PATH);
|
||||
|
|
Loading…
Reference in a new issue