Commit Graph

23374 Commits

Author SHA1 Message Date
Axel Dörfler
5da3fbc8ef * Moved general multi_audio functions into their own file MultiAudioUtility.cpp;
they don't really belong to the MultiAudioDevice class.
* Major coding style cleanup, part I - no functional change, I hope :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 19:19:29 +00:00
Axel Dörfler
98e10fd47f * _TransactionSize() did not take the block array into account.
* Therefore, the log was not flushed often enough:
  _WriteTransactionToLog() did not check again, and would eventually
  overwrite incomplete transactions (leading to a corrupted log on
  reboot)!
* _TransactionDone() now only flushes the log if the new transaction
  will be joined; _WriteTransactionToLog() now checks itself if there
  is enough space left to actually write the log entry.
* Added a TODO about the logging code not being endian-aware.
* Renamed _BlockNotify() to _TransactionNotify() as only complete
  transactions are notified, it's not working on block level anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 19:12:15 +00:00
Axel Dörfler
8af46ac846 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 19:06:25 +00:00
Axel Dörfler
2f20bf154e * Added "bfs" prefix to tracing output.
* When an inode is trimmed, it now also traces the previous internal
  size as well as the target size.
* Remove extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 18:51:35 +00:00
Axel Dörfler
4616b7ed27 * Added "-b" option to the "bfs_inode" command: when this is specified,
you can use a pointer to the inode block rather than to the Inode
  object in memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 18:48:57 +00:00
Stephan Aßmus
df542f717f Prepare the MediaPlayer to survive a media_server restart, by first
making it detect the quit/start of the media_server and media_addon_server.
No action is currently taken in response to this, but the SoundOutput used
by the Controller needs to be recreated I would think.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 14:12:21 +00:00
Axel Dörfler
2b1003a09a * The DeviceOpener class was leaking its block cache; RemoveCache()
would never do anything as fBlockCache was never set.
* DeviceOpener::InitCache() did not always correctly propagate the 
  read-only flag.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 12:52:30 +00:00
Axel Dörfler
41f8d41647 Applied patch by Rene Gollent:
* Add a cached_pages field to the system_info structure, and change the
  meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
  and vm_page_num_available_pages().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 11:51:45 +00:00
Axel Dörfler
b11e554156 * Added a small app that's able to truncate files - for testing purposes
only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 09:44:38 +00:00
Ingo Weinhold
070557e510 Fixed my previous execvp() endless loop fix, which would always cause
an infinite loop.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 04:10:14 +00:00
Ingo Weinhold
0343e0753a execvp() was looping endlessly if PATH contained empty entries.
Reorganized the loop so that this won't happen anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 03:46:08 +00:00
Ingo Weinhold
f18e099743 * Added Perl (5.10.0, gcc 2.95.3) optional package.
* Extended the Development optional package. It will now also install
  gcc/binutils as well as autoconf, automake, libtool, texinfo (and
  their dependency perl).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 02:01:54 +00:00
Ingo Weinhold
d41c97f7a5 Append the .zip extension to the package name rather than to replace the
suffix or otherwise package names with dots in them would be mangled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 01:58:41 +00:00
Ingo Weinhold
c7c82420e1 _single_threaded should have C linkage. Was for some reason only a
problem with gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 01:56:46 +00:00
Karsten Heimrich
c83ee60a7b * fixed typo in PreviewDriver
* also always add the resolution to the config message



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 00:26:55 +00:00
Ingo Weinhold
83c2cae69d Implemented execvp() for real.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 20:32:20 +00:00
Michael Pfeiffer
66a7a5c0d9 BeIDE build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:54:00 +00:00
Stephan Aßmus
9def3bf783 * Rewrote MediaRoster.h
* Removed appearantly unused satic variables. Hope this does not break
  binary compatibility, going to test.
* There are three more private methods, which could probably be removed
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:42:58 +00:00
Stephan Aßmus
a715f908f2 * Use new (std::nothrow), check for out of memory conditions and report them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:25:52 +00:00
Stephan Aßmus
8b940bb400 * Set the global BMediaRoster instance pointer to NULL in the destructor,
the DefaultDeleter is not the only situation in which the instance might
  be deleted, a client app can also call Quit() on the BMediaRoster instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:16:55 +00:00
Axel Dörfler
a121b8c83c * Added a new flag for write stat: B_STAT_SIZE_INSECURE that allows a
file system to not fill newly created space with zeros. 
  BFile::SetSize() now uses this, while [f]truncate() does not. This
  is only a temporary work-around until BFS supports sparse files.
* Apps that want to reserve space to fill up later should use 
  BFile::SetSize() for now, as this will be a lot faster than 
  [f]truncate().
* cache_io() and the functions below now use a special mode when you 
  pass in a NULL buffer: for read access, the cache is only populated
  (useful for prefetching), for write access, the file is filled with
  zeros.
* Implemented BFS's Inode::FillGapWithZeros() using this method now.
* Removed extraneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 13:39:02 +00:00
Karsten Heimrich
c8ee6ba8fb * do some simple checking if the printer exists and is usable at
all, otherwise complain or offer to make it the default printer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 13:23:03 +00:00
Axel Dörfler
04a969c8cf Should have been part of r24552 (replaced FS_WRITE_STAT_* constants with
the B_STAT_* constants as found in NodeMonitor.h).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:06:28 +00:00
Axel Dörfler
5e2ef462ec * Got rid of the duality of FS_WRITE_STAT_* vs. B_STAT_* flags (removed
the former ones).
* Removed extraneous white space.
* net_server settings are now also updated when the size of the 
  file changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:04:47 +00:00
Karsten Heimrich
1879dc35bf * some code cleanup
* adjusted copyright header
* remove PrinterSetupWindow, simply return the printer name
* some better interface layout, center windows on screen, etc...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 11:30:20 +00:00
Axel Dörfler
f9bcddd700 Revised r24541 to be hopefully acceptable by the coreutils maintainers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 11:18:14 +00:00
Axel Dörfler
13542b7379 Dano build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 10:23:02 +00:00
Ingo Weinhold
0956fd0502 Applied change proposed in #1917 after encountering the bug the third
time. Releasing the cache's store reference while holding the cache lock
could reverse the usual locking order -- the VFS could potentially call
the remove_vnode() or put_vnode() FS hook, which in turn could use the
file cache, thus resulting in a deadlock. Now we release the store ref
before locking the cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 05:15:42 +00:00
Ingo Weinhold
92af28df98 Turned the note into a TODO, adding a thought how to implement it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 02:31:20 +00:00
Rene Gollent
77570fb545 Disable tracing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 01:02:59 +00:00
Rene Gollent
612ab37d12 _user_set_tzfilename now correctly updates the system RTC offset. This
makes switching between GMT and local time in time prefs work correctly
without requiring a reboot to recalculate the clock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 01:01:51 +00:00
Ingo Weinhold
92c8608e6e Development optional package:
* Install libncurses.a.
* Copy the cpp headers from our repository; don't use the compiler
  headers. This needs some more shuffling around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 23:17:08 +00:00
Ingo Weinhold
0da9c20813 Switched the legacy compiler to the i586-pc-haiku 2.95.3-haiku-080323
gcc. You need to reconfigure and rebuild the cross-tools to have this
change take effect.

Note that from now on it is no longer possible to use the native BeOS
compiler to build Haiku. You'll have to build a cross compiler, too. I
haven't tested whether this works at all, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 23:06:23 +00:00
Axel Dörfler
409d26f976 This fixes the "weird file" error; it's not portable (same as before), though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 22:56:34 +00:00
Ingo Weinhold
5fd6637b4d * Decide whether to use BeOS style symbol resolution at run time
depending on the gcc version of the executable.
* Adjusted non-BeOS-style symbol resolution so that add-ons and
  dynamically loaded libraries find symbols in the executable.

This change re-enables support for undefined symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 19:43:41 +00:00
Michael Pfeiffer
80339607f9 Get first and last page from job settings instead of print_file_header. In print_filer_header first_page is an offset into the spool file (the field is unused or reserved on BeOS R5 and is always -1) and page_count is the number of pages in the spool file. In the job settings first/last page is the page number of the first/last page as specified in the page setup dialog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 18:01:13 +00:00
Michael Pfeiffer
242605b930 Set page_offset to -1 like BeOS R5 did.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:46:00 +00:00
Ingo Weinhold
3498280968 The runtime loader now reads a part of the .comment section of each
shared object to find out the GCC version it has been compiled with.
This is not an exact science, since we've got the version string for
every single object file that has been linked in, but my heuristic seems
to be good enough.

Having the gcc version at hand will allow for two features: Enabling
work-arounds for old executables (like the type info problem in BeOS
apps), and automatically selecting the right set of libraries in a mixed
gcc 2/gcc 4 environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 17:01:42 +00:00
Karsten Heimrich
e1656f01ae * build fix, removed leftover debug var...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:17:52 +00:00
Karsten Heimrich
96d23158ea * some small cleanup
* fFirstPage should be of type off_t



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 16:01:03 +00:00
Ingo Weinhold
e26a4ce3e9 Define __THROW.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-23 01:21:53 +00:00
Ingo Weinhold
0ba49c35b3 * BuildPlatformMain supports overriding HOST_LIBROOT on the target now,
so one can set it to the static libroot, if desired.
* Generic attribute emulation:
  - Added build tool rm_attrs, a simple "rm" replacement, which also
    removes the attributes directory for a given file.
  - Added build/scripts/rm_attrs shell script, which wraps the
    invocation of the rm_attrs tool. If it doesn't exist yet, the
    ordinary rm is used.
  - The RM jam variable refers to the rm_attrs script now, i.e. whenever
    something is removed by the build system, the attributes are removed
    too (if the build tool has already been built, that is).
  - Removed the shell function attrrmrf() in build_haiku_image. We use
    the rm_attrs tool instead, if necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 21:05:03 +00:00
Ingo Weinhold
b78dc1e8dd Generic attribute emulation: Export function __get_attribute_dir_path()
which returns the attribute directory for a given file's stat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 20:09:05 +00:00
Ingo Weinhold
1623d2e1ad Support building a static libroot_build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 20:06:45 +00:00
Ingo Weinhold
2754fa8772 bcopy() is supposed to be overlap-save.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 18:13:42 +00:00
Ingo Weinhold
8195a5a835 Prevent redefinition of _IO_MTSAFE_IO. It is defined when building the
legacy gcc's libio.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 15:26:55 +00:00
Ingo Weinhold
a8d29a100c Development optional package:
* Also install _G_config.h.
* /boot/develop/headers/cpp is a symlink to g++'s headers, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 15:13:21 +00:00
Niels Sascha Reedijk
ce9ba9b376 First version of the BMessageQueue documentation.
Note: I have cleared the original MessageQueue.cpp file from the inline documentation. When the storage kit comes up, we need to rediscuss the documentation policy.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 14:36:20 +00:00
Karsten Heimrich
bd937035c7 * adjusted copyright
* small coding style cleanups
* made the config window a bit more font sensitive
* removed unused code in AboutRequested, since change 19593 there is no Be anymore in the about text



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 00:34:49 +00:00
Karsten Heimrich
77258c7702 * proper check for the what field to show the config window
* if there are printers but no default one, show only the printer panel without the add dialog
* adjusted the alert message accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 00:20:26 +00:00