Commit Graph

59638 Commits

Author SHA1 Message Date
Augustin Cavalier
b6840f3610 netfs: Take advantage of HashKeyPointer.
Change-Id: I80b6eb40749a0d592b69bc7030608916b1c94a35
Reviewed-on: https://review.haiku-os.org/c/1054
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-15 00:34:36 +00:00
Augustin Cavalier
de48af7a58 Adapt all consumers of HashSet and HashMap to the slightly-different APIs.
No functional changes intended. Tested and verified as working.

Change-Id: Iaa67c2e5f0d9aff433ac7348e63e901a6a80e589
Reviewed-on: https://review.haiku-os.org/c/1043
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-15 00:34:36 +00:00
Augustin Cavalier
cc54b43e68 shared: Finish HashSet and fixup HashMap.
Changes are pretty straightforward. The iterator is now const
again, but can be passed to the hash table itself for removal
of the current item.

Change-Id: Ifd3c8096ffb187a183ca5963ed69a256562a524f
Reviewed-on: https://review.haiku-os.org/c/1042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-15 00:34:36 +00:00
Augustin Cavalier
eff1e73cef shared: Merge BOpenHashTable in; remove OpenTracker's OpenHashTable.
The HashMap and HashSet classes are copied from userlandfs. The
HashMap one works as-is as it's already used in userlandfs; the
HashSet does not even compile yet.

Change-Id: I1deabb54deb3f289e266794ce618948b60be58c0
Reviewed-on: https://review.haiku-os.org/c/1041
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-15 00:34:36 +00:00
Fabiano Fidêncio
4e29847d38 ImageRules: Use a less generic name as volume-id
The current volume-id is "bootimg", does not matter which version of
haiku nor to which architecture the ISO is targetting.

Having a "too generic" name as volume-id directly affects the ISO's
recognition by libosinfo.

From now on, let's use:
haiku-$(HAIKU_VERSION)-$(TARGET_ARCH)

Which would generate an ISO with volume-id as:
Volume id: haiku-default-r1~beta1-x86_64

Fixes: #14695

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>

Change-Id: I25e2f5338403058a363872abd196d698764cc3c1
Reviewed-on: https://review.haiku-os.org/c/1034
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-13 20:06:13 +00:00
Stephan Aßmus
a0d1cbb95d Revert "netfs: Take advantage of HashKeyPointer."
This reverts commit 279470d553.

Reason for revert: Commited in wrong order.

Change-Id: I1163b12728f19aee4506c95512d0afdea0433362
Reviewed-on: https://review.haiku-os.org/c/1046
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-13 10:50:02 +00:00
Augustin Cavalier
279470d553 netfs: Take advantage of HashKeyPointer.
Change-Id: I838d91cfa9b1b16ba9c42d62cabfe4716b49e425
Reviewed-on: https://review.haiku-os.org/c/1040
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-13 10:30:29 +00:00
Augustin Cavalier
58852727a3 BOpenHashTable: We need std::nothrow, so don't depend on others to include it.
Change-Id: Ibe21cef215a730f88eeea499c305a54ce397aeba
Reviewed-on: https://review.haiku-os.org/c/1039
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-13 10:29:24 +00:00
Rob Gill
a58cb2eff7 file_system/ext2 Fix checking wrong allocation
* Test the correct allocation before returning no memory

Change-Id: Id4422dab2e99487e015e1d915bfba5c18d1b8030
Reviewed-on: https://review.haiku-os.org/c/1044
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-13 10:26:43 +00:00
Augustin Cavalier
a5e9253fe0 BHoliday: Remove, unused.
There isn't much use for a class that can only compute the dates of
two minor and one major holiday. Probably in the future the Locale Kit
could be extended to expose ICU holiday APIs, but seeing as that
is a less-used functionality, this can just be removed altogether
for now at least.

Change-Id: I18be044be7d5c6896295ed85d294abeea90b8bb0
Reviewed-on: https://review.haiku-os.org/c/1037
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-13 10:14:59 +00:00
Rob Gill
41ddfe2a44 WebPositive Add option to start new session on startup
* Add settings file entry "start up policy", with two options:
   resume prior session, and start new session

 * Add dropdown to settings window to select option (defaulting
   to "resume prior session", which is the behaviour prior to
   this patch)

 * Add code to check setting on launch and open a new session,
   or reload the prior session as specified.

 * The "Start new session" option behaves in the same manner as
   opening a new window, following the user's already specified
   new window option

 * Related comment 2 of bug #14890

Change-Id: I46c33977bf3e9b943841f70050f890f51ac73bff
Reviewed-on: https://review.haiku-os.org/c/1035
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-12 09:56:39 +00:00
Puck Meerburg
2f1a930a4a Fix CID 1255187, 1255202, 1255213, 1255260, 1255308
Change-Id: If2357dc8e6147b2f1983f646e4f3ba70195e59ff
Reviewed-on: https://review.haiku-os.org/c/85
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-11 21:37:40 +00:00
Adrien Destugues
601c0fcae2 sdhci: silently handle empty interrupts
On my system the interrupt line is shared with the PS/2 controller, so
there are a lot of unhandled interrupts. Just silently ignore them.

Change-Id: Ia6812a5a1d78907622ddebbd03165ed016e26e26
Reviewed-on: https://review.haiku-os.org/c/1031
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-11 21:36:25 +00:00
Adrien Destugues
3aef22f7c8 sdhci: implement uninit_bus
Also avoid leaking resources in case initialization fails.

Change-Id: Ia533182eeeb81b7d52b49510b1f375a4fc55258f
Reviewed-on: https://review.haiku-os.org/c/1030
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-11 21:36:25 +00:00
Adrien Destugues
cdc4a175ca sdhci: refactor, get CMD0 working
- Define a class for each register, allowing easier access to relevant
  values. This avoids dealing with bitshifts and magic constants all
  over the code.
- Fix definition of CMD0 and the flags used to submit it. We now get a
  command completion interrupt, yay!
- Make some changes to support v3 and v4 controllers:
  - Enable PLL (harmless for older versions)
  - Manage faster and more configurable clock settings

Change-Id: I8a97edcb881acc1ac2a8b0a2593930f18e777594
Reviewed-on: https://review.haiku-os.org/c/1029
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-11 21:36:25 +00:00
Augustin Cavalier
f167d21adc runtime_loader: Use a RecursiveLocker instead of manually unlocking.
No functional change intended.
2019-02-11 16:35:33 -05:00
Augustin Cavalier
84e34948f6 WebPositive: Translate "No SSE2" window title, also. 2019-02-11 16:31:38 -05:00
Augustin Cavalier
35758c7046 CharacterMap: The CharacterView is scroll-view aware.
Fixes #14897.
2019-02-11 16:11:18 -05:00
Augustin Cavalier
514aaae7b1 Tracker: Remove list view menu from virtual directory window.
This reverts commit ed99a95f35.

It isn't needed now that list view sizing is dependent
on system font size.

Fixes #14897.
2019-02-11 16:07:22 -05:00
Adrien Destugues
f37553039b sdhci: define all registers from spec v4.20
Change-Id: Icf71fc2864bb084292f70c2433029ad2742727c8
Reviewed-on: https://review.haiku-os.org/c/1028
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-11 16:32:55 +00:00
Adrien Destugues
899da7db5a sdhci: Cleanup of registrer dump traces
- Try to group things on a single line where it makes sense
- Use hexadecimal values where appropriate

Change-Id: Ia5ebef84db5d511ea2603dfa4ffc9e90f7e86ca7
Reviewed-on: https://review.haiku-os.org/c/1027
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-11 16:32:55 +00:00
Rob Gill
8e3ccf2c01 BootManager Disallow install to read-only drive (Bug #14596 & Bug #7200)
* Test for read-only devices during drive scan
   if read-only detected, flag it in ui and disallow installation

Change-Id: Idd9e8e94d4a4840df97939154e1bbec70d0c0ece
Reviewed-on: https://review.haiku-os.org/c/1026
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-02-11 14:55:33 +00:00
Adrien Destugues
2c218a0e8b SerialConnect: increase scrollback size
1000 lines is not enough for a full boot log.

Change-Id: If1fe48349dec5cf0574de612c533b0037abc5043
Reviewed-on: https://review.haiku-os.org/c/1021
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-10 10:08:29 +00:00
Rob Gill
c306c63c13 apps/softwareupdater localization improvement Bug #14526
* Use BStringFormat to allow better translations of
   strings in alert

 * Reorganise alert: shorten title length, move number of
   updates into alert text

 * (code formatting) trailing whitespace removal

Change-Id: Ib239564c26a48225f97f9beb79537e82cc206af5
Reviewed-on: https://review.haiku-os.org/c/1023
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-10 10:06:44 +00:00
Rob Gill
1e82c5d927 preferences/printers Close dialog on alt+w/esc - Bug #14573
* Adds keyboard shortcuts to close the Add Printer dialog

Change-Id: Iac3d75c4b3e27793124919112f1be68308c95db3
Reviewed-on: https://review.haiku-os.org/c/1019
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-10 10:04:36 +00:00
Adrien Destugues
e89985cc31 Fix drawing of B_GRAY1 bitmaps.
- Colors were reversed
- Padding was not handled properly because of a roundeing error

Add a test that shows the issue (behavior confirmed against BeOS)

Change-Id: I4c6e954fb6bdab92ad4e0e96897e78b26eb4727b
Reviewed-on: https://review.haiku-os.org/c/1025
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-02-10 09:59:38 +00:00
Rob Gill
8341933096 preferences/datatranslations Scale window with font size (Fix Bug #13166)
* Specifies minimum window size based on system font settings
   (prevents clipping of message with large fonts)

Change-Id: I851e0c3604816a4e935178d1a4f33de7b7478060
Reviewed-on: https://review.haiku-os.org/c/1017
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-02-08 09:14:21 +00:00
Rob Gill
897792ef3f pkgman: Perform URL format validation Bug #13786
* Tests for validity of supplied URL before attempting to add it

   BUrl's isValid() is used to test the URL

Change-Id: I49bfc266177f16052a46ca3dbc1fd6e8dd1ab6ae
Reviewed-on: https://review.haiku-os.org/c/1020
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-08 07:33:26 +00:00
Adrien Destugues
7232789211 Extract parse_size function from ramdisk command.
Change-Id: If7dd36321e1ed2feb20b4c76ddaf303bc997d8b7
Reviewed-on: https://review.haiku-os.org/c/1018
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-02-08 07:19:26 +00:00
Murai Takashi
0ca56bdecd translators/wonderbrush: Fix PVS 2320
Fix memory leak when realloc() fails.

Change-Id: I9665b1e618e675e324eb75aec586a41181957ced
Reviewed-on: https://review.haiku-os.org/c/1015
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:43:07 +00:00
Murai Takashi
7db28d3803 kits/locale: Fix PVS 495
Fix memory leak when realloc() fails.

Change-Id: I9062bb177919805e9973c5afd6bc01f8fbb753b6
Reviewed-on: https://review.haiku-os.org/c/1016
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:43:00 +00:00
Murai Takashi
f9c74ffa6f add-ons/media/plugins/ffmpeg: Fix PVS 2355
Fix memory leak when realloc() fails.

Change-Id: I12b57fecbd7f9645f15afb9d0f9a6db937a5ec09
Reviewed-on: https://review.haiku-os.org/c/1014
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
2019-02-07 11:22:11 +00:00
Jérôme Duval
f33f4868fe posix_spawn: add posix_spawn_file_actions_add[f]chdir_np.
see http://austingroupbugs.net/view.php?id=1208
and https://sourceware.org/bugzilla/show_bug.cgi?id=17405

* also free paths in posix_spawn_file_actions_destroy().

Change-Id: I8bed848154025bd5a25322bdc4c25aa417f86ec6
Reviewed-on: https://review.haiku-os.org/c/1010
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-02-06 16:39:33 +00:00
Rob Gill
e4803b2c61 Code cleanup (ellipsis) no functional changes
* Replace instances of hardcoded "..." with B_UTF8_ELLIPSIS

 * Removal of trailing whitespaces

Change-Id: I82d26fb3e599daa2931c69c3bda3b9a5ab719d00
Reviewed-on: https://review.haiku-os.org/c/1012
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-06 16:37:51 +00:00
Murai Takashi
1d0064be8b file_systems/netfs/server: Fix attempting to delete released memory
Remove 'delete securityContext;' at line 967, since 'securityContext'
will be deleted by ObjectDeleter.

Pointed by clang static analyzer.

Change-Id: Iffcd6e2b293d5614fa15ee108562ff1f5f23ddc9
Reviewed-on: https://review.haiku-os.org/c/1011
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-06 07:27:12 +00:00
Jérôme Duval
af61539918 posix_spawn: add POSIX_SPAWN_SETSID.
see http://austingroupbugs.net/view.php?id=1044

Change-Id: I9ae4fe07ea0fa7e20eb9a1d8c64e971e7353bcff
Reviewed-on: https://review.haiku-os.org/c/1008
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-02-04 19:21:30 +00:00
Adrien Destugues
f0a99f2bea WebPositive: check if SSE2 is available.
We cannot run if it's not, but at least let's have an understandable
error message.

Fixes #14583

Change-Id: Ibe2e5d7721a1c48f06c2ac37d007a59d80c14bab
Reviewed-on: https://review.haiku-os.org/c/1007
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:44:50 +00:00
ahenriksson
c71d928ee0 bfs: Print diagnostic message when disk size is too small
Change-Id: Ie7bff78b1b0c783bc74f1fe774ec31f8437257df
Reviewed-on: https://review.haiku-os.org/c/922
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-02-04 16:37:35 +00:00
ahenriksson
0ec6ced115 bfs: Flush transactions with no blocks in _FlushLog()
Since the file system resizing code must reinitialize the block cache,
it is necessary that it is completely empty.

Change-Id: If0df9f8c003edb4ccc65c4b42940512400f8598c
Reviewed-on: https://review.haiku-os.org/c/921
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:37:35 +00:00
ahenriksson
b9256c155b disk_device_manager: implement KFileSystem::Resize()
Change-Id: I122a3881b0d0a8febc23c9751d5e32018c26da5e
Reviewed-on: https://review.haiku-os.org/c/920
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-04 16:37:35 +00:00
Rob Gill
13ce87c6f2 apps/processcontroller Fix deskbar icon scaling issue Bug #14696
* Clear entire width of interspace between CPU and Memory bars

   Fixes issue of artefacts appearing to the left of the memory
   bar when adjusting deskbar width, especially on multi-core
   systems at large font sizes.

   (original code appears to have assumed interspace would not
   exceed two pixels in width)

Change-Id: I4183d0337e47573792f35280452455fda584ccaf
Reviewed-on: https://review.haiku-os.org/c/1003
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:06:11 +00:00
Murai Takashi
f465c7fa61 kits/midi2: Fix PVS 820
Fix memory leak when realloc() fails.

Change-Id: Ic787ca714e4a106cc22e6186078a8e72d0a0553d
Reviewed-on: https://review.haiku-os.org/c/1006
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-03 18:05:55 +00:00
Murai Takashi
21392fa9b1 mail: Fix PVS 965
Fix memory leak when realloc() fails.

Change-Id: I8f7fb3ce7f43de03f76e8f0ee14277d79a55ee63
Reviewed-on: https://review.haiku-os.org/c/1005
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:05:55 +00:00
Murai Takashi
6c67c7d635 support/String: Fix PVS 626
Fix memory leak when realloc() fails.

Change-Id: I5b44df57bdd251e5164938ed70412c909ce09df1
Reviewed-on: https://review.haiku-os.org/c/1004
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:05:55 +00:00
Augustin Cavalier
e5d0c9094d BView: Add a B_SCROLL_VIEW_AWARE flag.
* This indicates the view will manage whatever scrollbars are targeted
   to it.
 * Use _B_RESERVED7_ for this. It's been RESERVED since BeOS R5
   (I guess it was probably something on some older BeOS version?)
   and we don't really care about BeOS R4 ABI compatibility, so
   that should be fine.
 * Update BScrollView to not touch BScrollBar range/proportion
   when the target view has this set.
 * Update BListView to set this flag, always.

Fixes #14871.

Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:04:13 +00:00
Rob Gill
b073a8c83f apps/autoraise Restore functionality
* Restore functionality / compilation
		(C++11)Spacing issues with string macros fixed.
		Fix type declarartion for removeFromDeskbar so compiles
		on x86_64.

	* Code format cleanup

	* Remove DANO related code

Change-Id: I738d14914e320b7606210d8263065187b2c06b1a
Reviewed-on: https://review.haiku-os.org/c/898
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:03:50 +00:00
Augustin Cavalier
3493fcb668 headers/kernel: Add argument names to initialization functions. 2019-02-02 18:10:54 -05:00
Augustin Cavalier
fa03522846 libroot: Revert changes to hide BeOS-only functions.
I wasn't thinking correctly when I made the previous change --
init_term_dyn is compiled into all applications, and so these
functions need to remain in order to not break them.
2019-02-02 18:09:28 -05:00
Augustin Cavalier
89b5768731 network/hostname: Mark as a "service"-type.
It is technically the "reverse" of DNS settings, which are also
classified as a "service", so they should go together.
2019-02-02 17:29:52 -05:00
Augustin Cavalier
15a4183640 libroot: Move some BeOS-only API calls behind _BEOS_R5_COMPATIBLE_.
This is defined by our build system on GCC2 only, so they will now
be excluded under all other architectures.
2019-02-02 14:36:26 -05:00