Commit Graph

23486 Commits

Author SHA1 Message Date
Axel Dörfler
e77b684f9e * Added very basic possibility to set a filter for all KDL command
output using the new "filter" command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 16:05:21 +00:00
Axel Dörfler
3bb1e6c264 * The block_cache KDL command now sets some useful variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 14:38:35 +00:00
Axel Dörfler
25ce50e1b9 * Something was fishy with the previous diff_lock-based implementation;
while I couldn't put my finger on it, I rarely got crashes with it.
* I've greatly simplified that mechanism now, and got rid of the 
  diff_locks completely - at least I understand the code now :)
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 10:50:47 +00:00
Ingo Weinhold
fb84047190 Null-terminate the _kern_read_link() result.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:18:40 +00:00
Ingo Weinhold
88c4c6627b * Added new rule CopyDirectoryToHaikuImage which recursively copies a
directory to the image. It supports exclude patterns.
* Changed Add{Source,Header}DirectoryToHaikuImage to use the
  CopyDirectoryToHaikuImage rule. The special handling in the
  build_haiku_image script is gone now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:14:25 +00:00
Ingo Weinhold
baba54f94f Added options -x and -X to the "cp" command, used to specify exclude
patterns for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:06:49 +00:00
Ingo Weinhold
b71cab0178 Added the options -x and -X to copyattr. They can be used to specify an
exclude pattern for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:05:25 +00:00
Ingo Weinhold
da17e06b92 Small helper class for filtering file/path names.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:03:44 +00:00
Jérôme Duval
cd9ce121d9 now checks if another mtrr range is extended by a new one and extends it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 20:55:12 +00:00
Axel Dörfler
c12ed8563a Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 20:29:49 +00:00
Axel Dörfler
4893165400 * Inode::OldSize() is the size of the file before the last index update
- this might be a bit older, so we cannot use it for the previous size
  in the call to Inode::FillGapWithZeros() in bfs_write_stat().
* This fixes the perl problem Ingo ran into after r24555.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 20:24:07 +00:00
Axel Dörfler
cd31b326a3 * The "block_cache" command checked the wrong variable to see if a block
could be found or not, eventually resulting in a read fault.
* It now also uses parse_expression() for its second argument, since it
  now returns an uint64 in Haiku.
* Tracing output cut off the label too early.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 19:21:01 +00:00
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