Commit Graph

48425 Commits

Author SHA1 Message Date
Ingo Weinhold
0122bbf08b findpaths: Add '-r' option
It allows finding a path for a resolvable expression.
2013-11-21 13:29:21 +01:00
Ingo Weinhold
62b164bd71 BPathFinder: Add BPackageResolvableExpression initialization
Add a constructor and a SetTo() method with a
BPackageResolvableExpression parameter instead of a path. The path of
the package satisfying the expression is used.

The new functionality lives in libpackage as it uses the package kit.
2013-11-21 13:29:21 +01:00
Ingo Weinhold
ee8e91583e BPackageManager::UserInteractionHandler: Make non-abstract
Most of the hooks don't strictly need a non-empty implementation. The
defaults now simply throw exceptions in those that do. This allows the
class to be instantiated, which is useful when a BPackageManager is only
used for finding packages.
2013-11-21 13:29:21 +01:00
Ingo Weinhold
6722e1ae43 BPackageManager: Add mandatory constructor parameters
Require the installation interface and the user interaction handle to
be passed to the constructor. Formerly, derived classes set them
manually in their constructors. This makes using the class without
having to subclass it possible.
2013-11-21 13:29:20 +01:00
Ingo Weinhold
88706cfaa5 package kit: Add API for parsing resolvable expression strings
* Add BPackageInfo::ParseResolvableExpressionString().
* Add BPackageResolvableExpression constructor and SetTo() taking an
  expression string.
2013-11-21 13:29:20 +01:00
Ingo Weinhold
23c521cf5e find_path*(): Improve B_FIND_PATH_IMAGE_PATH handling
* get_file_attribute(): Use O_NOTRAVERSE, so we correctly read the
  attribute from symlinks.
* internal_path_for_path(): Shuffle things around a bit: The dependency
  is resolved before handling B_FIND_PATH_PACKAGE_PATH, now. This adds
  support for getting the package file for a dependency. The dependency
  was ignored in this case before.
* Use kSystemPackageLinksDirectory instead of hard-coding "/packages".
2013-11-21 13:29:20 +01:00
Ingo Weinhold
d0126238fd packagefs: Automatic package attributes for packages symlinks
Add automatically generated attributes "SYS:PACKAGE" and
"SYS:PACKAGE_FILE" to the /packages/... directories and symlinks.
2013-11-21 13:29:20 +01:00
Ingo Weinhold
4c61288e73 packagefs: Refactor UnpackingAttributeDirectoryCookie
Pull out a reusable base class AutoPackageAttributeDirectoryCookie.
2013-11-21 13:29:19 +01:00
Rene Gollent
79b1f63e81 Fix SerialConnect gcc4 build.
- Add missing forward declaration for BFilePanel.
2013-11-20 19:37:55 -05:00
Rene Gollent
3cfd6956e9 Revert "serialconnect: Fix gcc4 build"
This reverts commit 1eb5facaf4.
2013-11-20 19:36:56 -05:00
John Scipione
22d7435282 screen_blanker: Check if be_app is NULL
... before using it after dynamic_cast. Fixes CID 1130496
2013-11-20 19:04:14 -05:00
Alexander von Gluck IV
1eb5facaf4 serialconnect: Fix gcc4 build
* SerialWindow.h mentions BFilePanel and needs the
  include statement
* Patch submitted by Urias McCullough
2013-11-20 18:03:54 -06:00
Adrien Destugues
3d5714e20d Add SerialConnect to HaikuImage.
It's now complete enough.
2013-11-20 22:39:17 +01:00
Adrien Destugues
ccc6b9be5b Make SerialConnect more complete
* Mark the current connected device, or disable "Disconnect" menu when
there is no connection.
* Save and restore serial port settings
* Improve drawing code: make sure the border around the termview is
repainted, and do not leave a 1px space between lines unpainted.
2013-11-20 22:39:16 +01:00
Adrien Destugues
5c4dd6047b Remove debug print. 2013-11-20 22:39:14 +01:00
Ingo Weinhold
5fc2757a74 Add user settable HAIKU_REVISION build variable
Can be set to a revision string (hrev4...) to override the revision
determined via git. Useful when the repository doesn't have tags.
2013-11-20 16:42:05 +01:00
Ezo
1329152b52 Fixed possible bug resulting in not null-terminated string
Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2013-11-20 16:07:07 +01:00
Ingo Weinhold
c04f3a625a boot loader: Add safe mode blacklist submenu
It's a browser for the system package content, where entries can be
selected to blacklist them. The selected entries are removed from the
packagefs instance in the boot loader, so that e.g. selected drivers
won't be picked up. The paths are also added to the safe mode driver
settings and will be interpreted when the system packagefs instance is
mounted by the kernel.
2013-11-20 16:00:35 +01:00
Ingo Weinhold
f2620e4714 boot loader: add_safe_mode_settings(): Make parameter const 2013-11-20 16:00:34 +01:00
Ingo Weinhold
6c7abe9829 boot loader: Menu[Item] API improvements
* Make Menu and MenuItem polymorphic.
* MenuItem:
  - Make SetMarked() virtual, so it can be overridden.
  - Add SetSubmenu() and Supermenu().
  - Delete the submenu in the destructor.
* Menu:
  - Add Entered()/Exited() hooks. They frame the time the user navigates
    the menu or any of its submenus. The hooks allow for subclasses
    populating their item list dynamically.
  - Add SortItems().
* Update boot loader menu copyright text to include 2013, now that it is
  over soon. :-)
2013-11-20 16:00:34 +01:00
Ingo Weinhold
435fb01509 DoublyLinkedList: Add Sort() 2013-11-20 16:00:34 +01:00
Ingo Weinhold
7e7f482590 SinglyLinkedList: Missing include 2013-11-20 16:00:34 +01:00
Puck Meerburg
658491b898 Fixed #9952.
* Delay of the password lock for a few seconds

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-11-19 20:34:06 +01:00
Jérôme Duval
72950e7c15 runtime_loader: fixes the 64-bit build.
1/ error: no matching function for call to 'min(long unsigned int,
uint32&)'.
2/ error: comparison between signed and unsigned integer expressions.
2013-11-19 20:17:08 +01:00
Ingo Weinhold
3a7e0b0014 packagefs: Support blacklisting entries in packages
In each installation location, it is now possible to create a settings
file "packages" that allows to blacklist entries contained in packages.
The format is:

Package <package name> {
	EntryBlacklist {
		<entry path>
		...
	}
}
...

<package name> is the base name (no version) of the respective package
(e.g. "haiku"), <entry path> is an installation location relative path
(e.g. "add-ons/Translators/FooTranslator").

Blacklisted entries will be ignored by packagefs, i.e. they won't appear
in the file system. This addresses the issue that it may be necessary to
remove a problematic file (e.g. driver, add-on, or library), which would
otherwise require editing the containing package file.

The settings file is not not "live". Changes take effect only after
reboot (respectively when remounting the concerned packagefs volume).
2013-11-19 15:30:34 +01:00
Ingo Weinhold
2fdd1d9ef1 khash: Move string hash functions to own header/source file
Unlike khash they shouldn't be phased out (only renamed).
2013-11-19 15:08:34 +01:00
Ingo Weinhold
efe9df3791 driver settings: Add load_driver_settings_file()
Allows loading an already opened driver settings file (by FD).
2013-11-19 15:06:30 +01:00
Ingo Weinhold
cf09345cf5 driver settings: Remove dead load_driver_settings_from_path()
load_driver_settings() supports being passed an absolute path.
2013-11-19 14:02:21 +01:00
Ingo Weinhold
7afd687f61 Add BPathFinder API docs 2013-11-19 02:05:37 +01:00
Ingo Weinhold
418c3fce24 Add get_*architecture*() API docs 2013-11-19 02:05:36 +01:00
Ingo Weinhold
8cb65bf1d7 Add find_path*() API docs, improve FindDirectory.h docs 2013-11-19 02:05:36 +01:00
Ingo Weinhold
0eb197d40c BPathFinder: Coding style improvements 2013-11-19 02:05:36 +01:00
Ingo Weinhold
81522ad41b find_path_for_path_etc(): Fail for B_FIND_PATH_IMAGE_PATH
There's no image in this case. We would just return the path we were
given.
2013-11-19 02:05:35 +01:00
Ingo Weinhold
22e92014f0 s/B_FIND_PATH_IMAGE_PACKAGE_PATH/B_FIND_PATH_PACKAGE_PATH/
It doesn't only work for image files, so make the name more general.
2013-11-19 02:05:35 +01:00
Stefano Ceccherini
0bc615438a Style fixes.
Style fixes pointed out by Axel. I'm rusty, and it shows.
Hope I got it right.
Also moved get_route() into BPrivate.
2013-11-18 20:01:35 +01:00
Stefano Ceccherini
fc51be0a4e Fix displaying wireless network authentication.
The wrong value was passed to WirelessNetworkMenuItem.
2013-11-18 15:25:16 +01:00
Stefano Ceccherini
1f177e3aec Get the route for the correct address family. 2013-11-18 15:25:16 +01:00
Adrien Destugues
60cb47a410 Add Ruby package.
Works well enough for building WebKit, but probably not much more.
2013-11-18 11:31:28 +01:00
Adrien Destugues
0cb0b65d3e Add the secondary arch version of libroot_debug
Some gristing mixup caused the non-secondary version of the lib to be
added to the non-secondary directory, which is what the main
architecture HaikuDevel is already doing.
2013-11-18 10:59:59 +01:00
Stefano Ceccherini
41d4206692 Added family parameter to the GetRoutes() API.
Moved common code to a private file.
2013-11-18 10:13:26 +01:00
Adrien Destugues
ba3f67bfb4 FileRequest: make sure we're dealing with a file.
Trying to Read from a directory results in an error code, but we also
missed that because an unsigned variable was used to store the result.

Fixes #10210.
2013-11-18 09:53:04 +01:00
Ingo Weinhold
94fb954c53 find_path*(): Support user specific home directory
No longer hard-code the home directory path. Instead ask
find_directory(), so we get the correct one for the current user.
2013-11-18 01:50:49 +01:00
Humdinger
d5f3d9c130 Added overlay image for read-only items.
Added a small padlock icon to mark read-only items.
See #10122.
2013-11-17 19:21:16 +01:00
Ingo Weinhold
04c6cb37bb find_directory(): Add architecture support
* Move PathBuffer helper class out of find_paths.cpp into its own
  header.
* find_directory():
  - Make use of MemoryDeleter to simplify things.
  - Make use of PathBuffer for a simpler and more correct handling.
  - Make B_UTILITIES_DIRECTORY to B_APPS_DIRECTORY. /boot/utilities
    doesn't exist anyway.
  - Resolve the concerned constants to the architecture specific
    subdirectory, when called in a secondary architecture context, just
    like find_path*().
2013-11-17 19:11:03 +01:00
Ingo Weinhold
7fb0d6c269 find_path*(): Fix B_FIND_PATH_MEDIA_NODES_DIRECTORY
It is architecture specific as well.
2013-11-17 19:11:02 +01:00
Ingo Weinhold
8a3fe6d1bf Add private __getenv_reentrant()
A reentrant variant of getenv().
2013-11-17 19:11:02 +01:00
Jérôme Duval
b38fed9370 usb_disk: accept B_DEV_MEDIA_CHANGED as a ready unit. 2013-11-17 18:13:51 +01:00
PieterPan
bca4535239 Devices: Check out of bound array access on category strings.
* Computes the length of the category strings array.
* Checks against this length before accessing the array
* Improves comment
* Should fix #10186

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2013-11-17 17:59:07 +01:00
Jérôme Duval
f584c0ca5f XHCI USB: some fixes.
* AllocateDevice(): don't include the root port in the route.
* SubmitNormalRequest(): fail if we couldn't allocate the a descriptor.
2013-11-17 17:47:51 +01:00
Ingo Weinhold
4f5e938576 Add setarch and getarch commands 2013-11-17 02:09:37 +01:00