added 2 changesets to branch 'refs/remotes/xyzzy-github/x86_64' old head: e963289800007e623f4a120b27e7bd476230f57f new head: 81aad168f87486149f6e4ce8acc43e3e7a5de9e1 ---------------------------------------------------------------------------- 5084d0d: Added more things to x86_64 image. Some preference apps, mount_server and AboutSystem. Removed the check for x86_64 in the boot script, the normal path through the script will work now. Also removed a temporary hack to workaround AboutSystem not being there in build_haiku_image. 81aad16: Fixed type mismatch in picture data. The size of an operation block was written as size_t by PictureDataWriter but read as int32 by PicturePlayer. Fixes an app_server crash. [ Alex Smith <alex@xxxxxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 19 files changed, 57 insertions(+), 51 deletions(-) build/jam/Haiku64Image | 31 ++++++++++++---- build/scripts/build_haiku_image | 3 -- data/system/boot/Bootscript | 8 ---- src/apps/aboutsystem/AboutSystem.cpp | 2 +- src/kits/interface/PicturePlayer.cpp | 6 +-- src/preferences/appearance/DecorSettingsView.cpp | 4 +- src/preferences/appearance/FontSelectionView.cpp | 4 +- .../filetypes/ApplicationTypeWindow.cpp | 8 ++-- .../filetypes/ApplicationTypesWindow.cpp | 8 ++-- src/preferences/filetypes/AttributeListView.cpp | 4 +- src/preferences/filetypes/AttributeWindow.cpp | 2 +- src/preferences/filetypes/FileTypesWindow.cpp | 2 +- src/preferences/keyboard/KeyboardSettings.cpp | 4 +- src/preferences/keymap/KeyboardLayout.cpp | 2 +- src/preferences/keymap/KeyboardLayoutView.cpp | 6 +-- src/preferences/notifications/GeneralView.cpp | 2 +- src/preferences/screen/ScreenWindow.cpp | 8 ++-- src/preferences/time/NetworkTimeView.cpp | 2 +- src/servers/mount/AutoMounter.cpp | 2 +- ############################################################################ Commit: 5084d0d451501f3c026d593dc109cbb76d7688fc Author: Alex Smith <alex@xxxxxxxxxxxxxxxx> Date: Fri Aug 10 08:32:54 2012 UTC Added more things to x86_64 image. Some preference apps, mount_server and AboutSystem. Removed the check for x86_64 in the boot script, the normal path through the script will work now. Also removed a temporary hack to workaround AboutSystem not being there in build_haiku_image. ---------------------------------------------------------------------------- diff --git a/build/jam/Haiku64Image b/build/jam/Haiku64Image index 0029669..f17adea 100644 --- a/build/jam/Haiku64Image +++ b/build/jam/Haiku64Image @@ -27,16 +27,20 @@ SYSTEM_BIN = "[" addattr base64 basename bash beep cal cat catattr chgrp chmod <bin>install isvolume join kernel_debugger kill less lessecho lesskey link linkcatkeys listdev ln locale locate logger logname ls md5sum mkdir mkfifo mktemp mount mountvolume mv nl nohup nproc od paste patch pathchk pr - printenv printf ps ptx pwd readlink rm rmattr rmdir safemode sdiff seq - sha1sum shred shuf sleep sort split stat strace stty su sum sync sysinfo - tac tail tee test timeout touch tr true truncate tsort tty unexpand uname - uniq unlink unmount unzip <bin>updatedb waitfor wc whoami xargs xres yes - zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew + printenv printf ps ptx pwd readlink ReadOnlyBootPrompt rm rmattr rmdir + safemode sdiff seq sha1sum shred shuf sleep sort split stat strace stty su + sum sync sysinfo tac tail tee test timeout touch tr true truncate tsort tty + unexpand uname uniq unlink unmount unzip <bin>updatedb waitfor wc whoami + xargs xres yes zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote + zipsplit zmore znew ; -SYSTEM_APPS = Terminal ; +SYSTEM_APPS = AboutSystem Terminal ; -SYSTEM_PREFERENCES = ; +SYSTEM_PREFERENCES = Appearance Backgrounds <preference>Deskbar FileTypes + Keyboard Keymap Locale Mouse Notifications Screen Time Touchpad + <preference>Tracker +; SYSTEM_DEMOS = ; @@ -49,7 +53,9 @@ SYSTEM_LIBS = libbe.so libbnetapi.so libdebug.so libnetwork.so PRIVATE_SYSTEM_LIBS = ; -SYSTEM_SERVERS = app_server debug_server input_server registrar syslog_daemon ; +SYSTEM_SERVERS = app_server debug_server input_server mount_server + notification_server registrar syslog_daemon +; SYSTEM_ADD_ONS_ACCELERANTS = vesa.accelerant ; @@ -153,6 +159,15 @@ for linkTarget in $(DESKBAR_APPLICATIONS) { : /boot/system/apps/$(linkTarget) : $(linkTarget) ; } +# Deskbar Preferences links +AddDirectoryToHaikuImage home config settings deskbar Preferences ; +DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ; +for linkTarget in $(DESKBAR_PREFERENCES) { + AddSymlinkToHaikuImage home config settings deskbar Preferences + : /boot/system/preferences/$(linkTarget) + : $(linkTarget) ; +} + AddSymlinkToHaikuImage system bin : less : more ; AddSymlinkToHaikuImage system bin : gzip : gunzip ; AddSymlinkToHaikuImage system bin : gzip : zcat ; diff --git a/build/scripts/build_haiku_image b/build/scripts/build_haiku_image index 69100d9..d6001f9 100755 --- a/build/scripts/build_haiku_image +++ b/build/scripts/build_haiku_image @@ -329,8 +329,6 @@ fi # ! updateOnly # add the concatenated copyrights as an attribute to AboutSystem if [ ! $updateOnly ]; then -# TODO x86_64: temporary hack, AboutSystem doesn't exist yet. -if [ -f $outputDir/objects/haiku/*/*/apps/aboutsystem/AboutSystem ]; then if [ -f $copyrightsFile ]; then copyrightAttrs=$tmpDir/copyrightAttrs $rmAttrs -f $copyrightAttrs @@ -339,7 +337,6 @@ if [ -f $outputDir/objects/haiku/*/*/apps/aboutsystem/AboutSystem ]; then $copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}system/apps/AboutSystem fi fi -fi if [ $isCD ]; then # generate the attribute stores diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 10305aa..3a52cb2 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -116,14 +116,6 @@ if [ "$SAFEMODE" != "yes" ]; then waitfor _input_server_event_loop_ # wait for input devices fi -# TODO: remove this when x86_64 is more complete. -if [ "$(uname -m)" = "x86_64" ]; then - cd /boot/home - launch system/Tracker - launch system/Deskbar - exit -fi - # Now ask the user if he wants to run the Installer or continue to the Desktop. if [ "$isReadOnly" = "yes" ]; then # Create Installer link (using the write overlay) diff --git a/src/apps/aboutsystem/AboutSystem.cpp b/src/apps/aboutsystem/AboutSystem.cpp index ec3303c..c2eb25c 100644 --- a/src/apps/aboutsystem/AboutSystem.cpp +++ b/src/apps/aboutsystem/AboutSystem.cpp @@ -970,7 +970,7 @@ AboutView::_CreateCreditsView() if (year < 2008) year = 2008; snprintf(string, sizeof(string), - COPYRIGHT_STRING "2001-%ld The Haiku project. ", year); + COPYRIGHT_STRING "2001-%" B_PRId32 " The Haiku project. ", year); fCreditsView->SetFontAndColor(be_plain_font, B_FONT_ALL, &kDarkGrey); fCreditsView->Insert(string); diff --git a/src/preferences/appearance/DecorSettingsView.cpp b/src/preferences/appearance/DecorSettingsView.cpp index 711c534..b98ddff 100644 --- a/src/preferences/appearance/DecorSettingsView.cpp +++ b/src/preferences/appearance/DecorSettingsView.cpp @@ -143,8 +143,8 @@ DecorSettingsView::_BuildDecorMenu() for (int32 i = 0; i < count; ++i) { DecorInfo* decorator = fDecorUtility.DecoratorAt(i); if (decorator == NULL) { - fprintf(stderr, "Decorator : error NULL entry @ %li / %li\n", - i, count); + fprintf(stderr, "Decorator : error NULL entry @ %" B_PRId32 " / %" + B_PRId32 "\n", i, count); continue; } diff --git a/src/preferences/appearance/FontSelectionView.cpp b/src/preferences/appearance/FontSelectionView.cpp index e638b50..9e5c0a2 100644 --- a/src/preferences/appearance/FontSelectionView.cpp +++ b/src/preferences/appearance/FontSelectionView.cpp @@ -258,7 +258,7 @@ FontSelectionView::_BuildSizesMenu() continue; char label[32]; - snprintf(label, sizeof(label), "%ld", size); + snprintf(label, sizeof(label), "%" B_PRId32, size); BMessage* message = new BMessage(kMsgSetSize); message->AddInt32("size", size); @@ -297,7 +297,7 @@ void FontSelectionView::_SelectCurrentSize(bool select) { char label[16]; - snprintf(label, sizeof(label), "%ld", (int32)fCurrentFont.Size()); + snprintf(label, sizeof(label), "%" B_PRId32, (int32)fCurrentFont.Size()); BMenuItem* item = fSizesMenu->FindItem(label); if (item != NULL) diff --git a/src/preferences/filetypes/ApplicationTypeWindow.cpp b/src/preferences/filetypes/ApplicationTypeWindow.cpp index 77fc74f..d556cd6 100644 --- a/src/preferences/filetypes/ApplicationTypeWindow.cpp +++ b/src/preferences/filetypes/ApplicationTypeWindow.cpp @@ -610,11 +610,11 @@ ApplicationTypeWindow::_SetTo(const BEntry& entry) // version info char text[256]; - snprintf(text, sizeof(text), "%ld", versionInfo.major); + snprintf(text, sizeof(text), "%" B_PRId32, versionInfo.major); fMajorVersionControl->SetText(text); - snprintf(text, sizeof(text), "%ld", versionInfo.middle); + snprintf(text, sizeof(text), "%" B_PRId32, versionInfo.middle); fMiddleVersionControl->SetText(text); - snprintf(text, sizeof(text), "%ld", versionInfo.minor); + snprintf(text, sizeof(text), "%" B_PRId32, versionInfo.minor); fMinorVersionControl->SetText(text); if (versionInfo.variety >= (uint32)fVarietyMenu->CountItems()) @@ -623,7 +623,7 @@ ApplicationTypeWindow::_SetTo(const BEntry& entry) if (item != NULL) item->SetMarked(true); - snprintf(text, sizeof(text), "%ld", versionInfo.internal); + snprintf(text, sizeof(text), "%" B_PRId32, versionInfo.internal); fInternalVersionControl->SetText(text); fShortDescriptionControl->SetText(versionInfo.short_info); diff --git a/src/preferences/filetypes/ApplicationTypesWindow.cpp b/src/preferences/filetypes/ApplicationTypesWindow.cpp index bd65960..b485d0f 100644 --- a/src/preferences/filetypes/ApplicationTypesWindow.cpp +++ b/src/preferences/filetypes/ApplicationTypesWindow.cpp @@ -108,7 +108,7 @@ ProgressWindow::ProgressWindow(const char* message, fQuitListener(signalQuit) { char count[100]; - snprintf(count, sizeof(count), "/%ld", max); + snprintf(count, sizeof(count), "/%" B_PRId32, max); fStatusBar = new BStatusBar("status", message, count); fStatusBar->SetMaxValue(max); @@ -141,7 +141,8 @@ ProgressWindow::MessageReceived(BMessage* message) switch (message->what) { case B_UPDATE_STATUS_BAR: char count[100]; - snprintf(count, sizeof(count), "%ld", (int32)fStatusBar->CurrentValue() + 1); + snprintf(count, sizeof(count), "%" B_PRId32, + (int32)fStatusBar->CurrentValue() + 1); fStatusBar->Update(1, NULL, count); break; @@ -431,7 +432,8 @@ ApplicationTypesWindow::_SetType(BMimeType* type, int32 forceUpdate) && appInfo.GetVersionInfo(&versionInfo, B_APP_VERSION_KIND) == B_OK) { char version[256]; - snprintf(version, sizeof(version), "%lu.%lu.%lu, %s/%lu", + snprintf(version, sizeof(version), + "%" B_PRIu32 ".%" B_PRIu32 ".%" B_PRIu32 ", %s/%" B_PRIu32, versionInfo.major, versionInfo.middle, versionInfo.minor, variety_to_text(versionInfo.variety), diff --git a/src/preferences/filetypes/AttributeListView.cpp b/src/preferences/filetypes/AttributeListView.cpp index ebdc8f7..8c95102 100644 --- a/src/preferences/filetypes/AttributeListView.cpp +++ b/src/preferences/filetypes/AttributeListView.cpp @@ -82,7 +82,7 @@ name_for_type(BString& string, type_code type, const char* displayAs) buffer[i] = '.'; } - snprintf(buffer + 6, sizeof(buffer), " (0x%lx)", type); + snprintf(buffer + 6, sizeof(buffer), " (0x%" B_PRIx32 ")", type); string = buffer; } @@ -278,7 +278,7 @@ AttributeListView::SetTo(BMimeType* type) // Remove the current items but remember them for now. Also remember // the currently selected item. BObjectList<AttributeItem> previousItems(CountItems(), true); - while (AttributeItem* item = (AttributeItem*)RemoveItem(0L)) + while (AttributeItem* item = (AttributeItem*)RemoveItem((int32)0)) previousItems.AddItem(item); // fill it again diff --git a/src/preferences/filetypes/AttributeWindow.cpp b/src/preferences/filetypes/AttributeWindow.cpp index 65f8276..ad77bab 100644 --- a/src/preferences/filetypes/AttributeWindow.cpp +++ b/src/preferences/filetypes/AttributeWindow.cpp @@ -173,7 +173,7 @@ AttributeWindow::AttributeWindow(FileTypesWindow* target, BMimeType& mimeType, fSpecialControl->SetEnabled(false); char text[64]; - snprintf(text, sizeof(text), "%ld", fAttribute.Width()); + snprintf(text, sizeof(text), "%" B_PRId32, fAttribute.Width()); fWidthControl = new BTextControl(B_TRANSLATE_COMMENT("Width:", "Default column width in Tracker for this attribute."), text, NULL); diff --git a/src/preferences/filetypes/FileTypesWindow.cpp b/src/preferences/filetypes/FileTypesWindow.cpp index ed2b153..ad9748b 100644 --- a/src/preferences/filetypes/FileTypesWindow.cpp +++ b/src/preferences/filetypes/FileTypesWindow.cpp @@ -965,7 +965,7 @@ FileTypesWindow::QuitRequested() { BMessage update(kMsgSettingsChanged); update.AddRect("file_types_frame", Frame()); - update.AddFloat("left_split_weight", fMainSplitView->ItemWeight(0L)); + update.AddFloat("left_split_weight", fMainSplitView->ItemWeight((int32)0)); update.AddFloat("right_split_weight", fMainSplitView->ItemWeight(1)); be_app_messenger.SendMessage(&update); diff --git a/src/preferences/keyboard/KeyboardSettings.cpp b/src/preferences/keyboard/KeyboardSettings.cpp index 6b9994a..4846203 100644 --- a/src/preferences/keyboard/KeyboardSettings.cpp +++ b/src/preferences/keyboard/KeyboardSettings.cpp @@ -98,8 +98,8 @@ KeyboardSettings::SetKeyboardRepeatDelay(bigtime_t delay) void KeyboardSettings::Dump() { - printf("repeat rate: %ld\n", fSettings.key_repeat_rate); - printf("repeat delay: %Ld\n", fSettings.key_repeat_delay); + printf("repeat rate: %" B_PRId32 "\n", fSettings.key_repeat_rate); + printf("repeat delay: %" B_PRId64 "\n", fSettings.key_repeat_delay); } diff --git a/src/preferences/keymap/KeyboardLayout.cpp b/src/preferences/keymap/KeyboardLayout.cpp index caabcba..d294201 100644 --- a/src/preferences/keymap/KeyboardLayout.cpp +++ b/src/preferences/keymap/KeyboardLayout.cpp @@ -332,7 +332,7 @@ KeyboardLayout::_Error(const parse_state& state, const char* reason, ...) va_list args; va_start(args, reason); - fprintf(stderr, "Syntax error in line %ld: ", state.line); + fprintf(stderr, "Syntax error in line %" B_PRId32 ": ", state.line); vfprintf(stderr, reason, args); fprintf(stderr, "\n"); diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index a65b7c5..6bf5fc5 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -590,7 +590,7 @@ KeyboardLayoutView::_DrawKey(BView* view, BRect updateRect, const Key* key, fDeadKey); } else { // Show the key code if there is no keymap - snprintf(text, sizeof(text), "%02lx", key->code); + snprintf(text, sizeof(text), "%02" B_PRIx32, key->code); } _SetFontSize(view, keyKind); @@ -821,7 +821,7 @@ bool KeyboardLayoutView::_FunctionKeyLabel(uint32 code, char* text, size_t textSize) { if (code >= B_F1_KEY && code <= B_F12_KEY) { - snprintf(text, textSize, "F%ld", code + 1 - B_F1_KEY); + snprintf(text, textSize, "F%" B_PRId32, code + 1 - B_F1_KEY); return true; } @@ -1016,7 +1016,7 @@ KeyboardLayoutView::_KeyChanged(const BMessage* message) checkSingle = false; if (_KeyForCode(key) == NULL) - printf("no key for code %ld\n", key); + printf("no key for code %" B_PRId32 "\n", key); } for (int32 i = 0; i < 16; i++) { diff --git a/src/preferences/notifications/GeneralView.cpp b/src/preferences/notifications/GeneralView.cpp index 6145e8d..ecce5b6 100644 --- a/src/preferences/notifications/GeneralView.cpp +++ b/src/preferences/notifications/GeneralView.cpp @@ -239,7 +239,7 @@ GeneralView::Load() int32 timeout; if (settings.FindInt32(kTimeoutName, &timeout) != B_OK) timeout = kDefaultTimeout; - (void)sprintf(buffer, "%ld", timeout); + (void)sprintf(buffer, "%" B_PRId32, timeout); fTimeout->SetText(buffer); return B_OK; diff --git a/src/preferences/screen/ScreenWindow.cpp b/src/preferences/screen/ScreenWindow.cpp index 5055cdb..c0f7b45 100644 --- a/src/preferences/screen/ScreenWindow.cpp +++ b/src/preferences/screen/ScreenWindow.cpp @@ -823,10 +823,10 @@ ScreenWindow::_UpdateWorkspaceButtons() BPrivate::get_workspaces_layout(&columns, &rows); char text[32]; - snprintf(text, sizeof(text), "%ld", columns); + snprintf(text, sizeof(text), "%" B_PRId32, columns); fColumnsControl->SetText(text); - snprintf(text, sizeof(text), "%ld", rows); + snprintf(text, sizeof(text), "%" B_PRId32, rows); fRowsControl->SetText(text); _GetColumnRowButton(true, false)->SetEnabled(columns != 1 && rows != 32); @@ -1107,8 +1107,8 @@ ScreenWindow::_WriteVesaModeFile(const screen_mode& mode) const return status; char buffer[256]; - snprintf(buffer, sizeof(buffer), "mode %ld %ld %ld\n", - mode.width, mode.height, mode.BitsPerPixel()); + snprintf(buffer, sizeof(buffer), "mode %" B_PRId32 " %" B_PRId32 " %" + B_PRId32 "\n", mode.width, mode.height, mode.BitsPerPixel()); ssize_t bytesWritten = file.Write(buffer, strlen(buffer)); if (bytesWritten < B_OK) diff --git a/src/preferences/time/NetworkTimeView.cpp b/src/preferences/time/NetworkTimeView.cpp index 55efc8c..c0dbfc5 100644 --- a/src/preferences/time/NetworkTimeView.cpp +++ b/src/preferences/time/NetworkTimeView.cpp @@ -479,7 +479,7 @@ NetworkTimeView::_InitView() void NetworkTimeView::_UpdateServerList() { - while (fServerListView->RemoveItem(0L) != NULL); + while (fServerListView->RemoveItem((int32)0) != NULL); const char* server; int32 index = 0; diff --git a/src/servers/mount/AutoMounter.cpp b/src/servers/mount/AutoMounter.cpp index cf6fb72..8248ed7 100644 --- a/src/servers/mount/AutoMounter.cpp +++ b/src/servers/mount/AutoMounter.cpp @@ -718,7 +718,7 @@ AutoMounter::_UnmountAndEjectVolume(BMessage* message) if (status == B_OK) status = volume.GetName(name); if (status < B_OK) - snprintf(name, sizeof(name), "device:%ld", device); + snprintf(name, sizeof(name), "device:%" B_PRIdDEV, device); BPath path; if (status == B_OK) { ############################################################################ Commit: 81aad168f87486149f6e4ce8acc43e3e7a5de9e1 Author: Alex Smith <alex@xxxxxxxxxxxxxxxx> Date: Fri Aug 10 09:34:28 2012 UTC Fixed type mismatch in picture data. The size of an operation block was written as size_t by PictureDataWriter but read as int32 by PicturePlayer. Fixes an app_server crash. ---------------------------------------------------------------------------- diff --git a/src/kits/interface/PicturePlayer.cpp b/src/kits/interface/PicturePlayer.cpp index 4f09067..ab96b0a 100644 --- a/src/kits/interface/PicturePlayer.cpp +++ b/src/kits/interface/PicturePlayer.cpp @@ -173,9 +173,9 @@ PicturePlayer::Play(void **callBackTable, int32 tableEntries, void *userData) while ((pos + 6) <= fSize) { int16 op = *reinterpret_cast<const int16 *>(data); - int32 size = *reinterpret_cast<const int32 *>(data + 2); - pos += 6; - data += 6; + size_t size = *reinterpret_cast<const size_t *>(data + sizeof(int16)); + pos += sizeof(int16) + sizeof(size_t); + data += sizeof(int16) + sizeof(size_t); if (pos + size > fSize) debugger("PicturePlayer::Play: buffer overrun\n");