Chameleon

Chameleon Commit Details

Date:2010-07-26 01:28:58 (9 years 2 months ago)
Author:Tamás Kosárszky
Commit:253
Parents: 252
Message:Renamed getDeviceStringFromBVR() to getDeviceDescription() and always initializing the output string.
Changes:
M/branches/zef/i386/libsaio/saio_internal.h
M/branches/zef/i386/libsaio/sys.c
M/branches/zef/i386/libsaio/hfs.c
M/branches/zef/i386/libsaio/msdos.c
M/branches/zef/i386/boot2/gui.c
M/branches/zef/i386/libsaio/disk.c

File differences

branches/zef/i386/libsaio/hfs.c
299299
300300
301301
302
302
303303
304304
305305
return -1;
}
getDeviceStringFromBVR(ih, devStr);
getDeviceDescription(ih, devStr);
verbose("Read HFS%s file: [%s/%s] %d bytes.\n",
(gIsHFSPlus ? "+" : ""), devStr, filePath, (uint32_t)length);
branches/zef/i386/libsaio/sys.c
10761076
10771077
10781078
1079
1079
1080
1081
1082
10801083
10811084
10821085
1086
1087
10831088
10841089
1085
1090
1091
1092
10861093
1087
1088
1089
1090
1091
1094
10921095
10931096
10941097
return bvr ? bvr : bvr1;
}
int getDeviceStringFromBVR(const BVRef bvr, char *str)
//==========================================================================
// getDeviceDescription() - Extracts unit number and partition number
// from bvr structure into "dw(u,p)" format.
int getDeviceDescription(BVRef bvr, char *str)
{
const struct devsw *dp;
*str = '\0';
if (bvr)
{
*str = '\0';
for (dp = devsw; dp->name && bvr->biosdev >= dp->biosdev; dp++);
dp--;
if (dp->name) sprintf(str, "%s(%d,%d)", dp->name, bvr->biosdev - dp->biosdev, bvr->part_no);
for (dp = devsw; dp->name && bvr->biosdev >= dp->biosdev; dp++);
dp--;
if (dp->name) sprintf(str, "%s(%d,%d)", dp->name, bvr->biosdev - dp->biosdev, bvr->part_no);
return true;
return true;
}
return false;
branches/zef/i386/libsaio/disk.c
17071707
17081708
17091709
1710
1710
1711
17111712
17121713
17131714
p = str;
if (verbose) {
sprintf( str, "hd(%d,%d) ", BIOS_DEV_UNIT(bvr), bvr->part_no);
getDeviceDescription(bvr, str);
strcat(str, " ");
for (; strMaxLen > 0 && *p != '\0'; p++, strMaxLen--);
}
branches/zef/i386/libsaio/msdos.c
757757
758758
759759
760
760
761761
762762
763763
toread-=msdosclustersize;
}
getDeviceStringFromBVR(ih, devStr);
getDeviceDescription(ih, devStr);
verbose("Read FAT%d file: [%s/%s] %d bytes.\n",
msdosfatbits, devStr, filePath, (uint32_t)( toread<0 ) ? wastoread : wastoread-toread);
free (buf);
branches/zef/i386/libsaio/saio_internal.h
202202
203203
204204
205
205
206206
207207
208208
extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen, bool verbose);
extern void setRootVolume(BVRef volume);
extern void setBootGlobals(BVRef chain);
extern int getDeviceStringFromBVR(const BVRef volume, char *str);
extern int getDeviceDescription(BVRef volume, char *str);
extern int gBIOSDev;
extern int gBootFileType;
branches/zef/i386/boot2/gui.c
8787
8888
8989
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136136
137137
138138
......
18111811
18121812
18131813
1814
1815
1814
1815
1816
1817
18161818
18171819
18181820
};
image_t images[] = {
{.name = "background", .image = NULL},
{.name = "logo", .image = NULL},
{.name = "device_generic", .image = NULL},
{.name = "device_generic_o", .image = NULL},
{.name = "device_hfsplus", .image = NULL},
{.name = "device_hfsplus_o", .image = NULL},
{.name = "device_hfsraid", .image = NULL},
{.name = "device_hfsraid_o", .image = NULL},
{.name = "device_ext3", .image = NULL},
{.name = "device_ext3_o", .image = NULL},
{.name = "device_fat", .image = NULL},
{.name = "device_fat_o", .image = NULL},
{.name = "device_fat16", .image = NULL},
{.name = "device_fat16_o", .image = NULL},
{.name = "device_fat32", .image = NULL},
{.name = "device_fat32_o", .image = NULL},
{.name = "device_ntfs", .image = NULL},
{.name = "device_ntfs_o", .image = NULL},
{.name = "device_cdrom", .image = NULL},
{.name = "device_cdrom_o", .image = NULL},
{.name = "background",.image = NULL},
{.name = "logo",.image = NULL},
{.name = "device_generic",.image = NULL},
{.name = "device_generic_o",.image = NULL},
{.name = "device_hfsplus",.image = NULL},
{.name = "device_hfsplus_o",.image = NULL},
{.name = "device_hfsraid",.image = NULL},
{.name = "device_hfsraid_o",.image = NULL},
{.name = "device_ext3",.image = NULL},
{.name = "device_ext3_o",.image = NULL},
{.name = "device_fat",.image = NULL},
{.name = "device_fat_o",.image = NULL},
{.name = "device_fat16",.image = NULL},
{.name = "device_fat16_o",.image = NULL},
{.name = "device_fat32",.image = NULL},
{.name = "device_fat32_o",.image = NULL},
{.name = "device_ntfs",.image = NULL},
{.name = "device_ntfs_o",.image = NULL},
{.name = "device_cdrom",.image = NULL},
{.name = "device_cdrom_o",.image = NULL},
{.name = "device_selection", .image = NULL},
{.name = "device_scroll_prev", .image = NULL},
{.name = "device_scroll_next", .image = NULL},
{.name = "menu_boot", .image = NULL},
{.name = "menu_verbose", .image = NULL},
{.name = "menu_ignore_caches", .image = NULL},
{.name = "menu_single_user", .image = NULL},
{.name = "menu_memory_info", .image = NULL},
{.name = "menu_video_info", .image = NULL},
{.name = "menu_help", .image = NULL},
{.name = "menu_verbose_disabled", .image = NULL},
{.name = "menu_ignore_caches_disabled", .image = NULL},
{.name = "menu_single_user_disabled", .image = NULL},
{.name = "menu_selection", .image = NULL},
{.name = "progress_bar", .image = NULL},
{.name = "progress_bar_background", .image = NULL},
{.name = "text_scroll_prev", .image = NULL},
{.name = "text_scroll_next", .image = NULL},
{.name = "font_console", .image = NULL},
{.name = "font_small", .image = NULL},
{.name = "device_selection",.image = NULL},
{.name = "device_scroll_prev",.image = NULL},
{.name = "device_scroll_next",.image = NULL},
{.name = "menu_boot",.image = NULL},
{.name = "menu_verbose",.image = NULL},
{.name = "menu_ignore_caches",.image = NULL},
{.name = "menu_single_user",.image = NULL},
{.name = "menu_memory_info",.image = NULL},
{.name = "menu_video_info",.image = NULL},
{.name = "menu_help",.image = NULL},
{.name = "menu_verbose_disabled",.image = NULL},
{.name = "menu_ignore_caches_disabled", .image = NULL},
{.name = "menu_single_user_disabled",.image = NULL},
{.name = "menu_selection",.image = NULL},
{.name = "progress_bar",.image = NULL},
{.name = "progress_bar_background",.image = NULL},
{.name = "text_scroll_prev",.image = NULL},
{.name = "text_scroll_next",.image = NULL},
{.name = "font_console",.image = NULL},
{.name = "font_small",.image = NULL},
};
int imageCnt = 0;
// find best matching vesa mode for our requested width & height
getGraphicModeParams(screen_params);
setVideoMode(GRAPHICS_MODE, 0);
if (bootArgs->Video.v_display == VGA_TEXT_MODE) {
setVideoMode(GRAPHICS_MODE, 0);
}
if (getValueForKey("-checkers", &dummyVal, &length, &bootInfo->bootConfig)) {
drawCheckerBoard();
} else {

Archive Download the corresponding diff file

Revision: 253