Commit Graph

21952 Commits

Author SHA1 Message Date
Axel Dörfler
4a31d30e84 * The file map needs to know the actual file size to be able to know if it has
the complete extent info or not.
* file_map_translate() now cuts down the request to the file bounds.
* Adjusted BFS and FAT to the API changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-13 10:34:48 +00:00
Axel Dörfler
88ef411154 * Added an UninitializeMedia() method to KDiskDevice that also resets the
device geometry.
* If SetTo() reports no media, and GetGeometry() fails, the device geometry
  is now reset as well.
* KDiskDeviceManager::_ScanPartition() no longer unmarks the partition busy;
  this is now done by the caller, and done independently from the outcome of
  _ScanPartition(). This also fixes the problem that devices with no media
  were never marked unbusy (and thus were ignored subsequently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 23:20:33 +00:00
Axel Dörfler
ef6f42349c * The session module deleted its cookie twice, after identifying, and when the
partition cookie was deleted - when removing a CD it would crash.
* Since the partition cookies are not needed at all, we don't use it anymore.
* scan_partition() deleted the identify cookie on error, but that's not its
  job - free_identify_cookie() is always called, no matter what scan partition
  does.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 22:38:39 +00:00
Ingo Weinhold
6e122bd99e axeld + bonefish: Missed those changes in the previous commit:
* Added vfs_unmount(), which allows unmounting by dev_t (used by the DDM).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 20:54:17 +00:00
Ingo Weinhold
b3a5629b9e axeld + bonefish:
* Unmount when uninitializing a partition.
* Finished the media checker implementation, i.e. we rescan when a media
  was inserted and uninitialize when ejected.
* Turned the disk device media checker from a kernel daemon into a thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 18:41:36 +00:00
Axel Dörfler
5b1f301a11 * _FindBestMode() can now also take the aspect ratio into account.
* Reduced rating of the color space - after all, the resolution is more
  important.
* The EDID detailed modes are now scanned for the best mode available, this
  could be done in various ways, so please report any problems you have with
  it.
* Ignore resolutions below 640x350 - this should also fix bug #1615.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 11:44:55 +00:00
Ingo Weinhold
2a6d40aea3 Patch by Vasilis Kaoutsis (slightly edited):
* The POSIX test suite is copied to the image when the jam variable
  HAIKU_ADD_POSIX_TEST_SUITE_TO_IMAGE is defined (cf. UserBuildConfig.sample).
* Added difftime and fork tests to the test suite run script.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-12 00:08:06 +00:00
Stephan Aßmus
c50a1ab8a4 * fix spelling mistake diamont -> diamond (fixes #1618)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 23:00:11 +00:00
François Revol
6548a8f371 Put return types for funcs on their own line.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 20:37:10 +00:00
François Revol
3503c8b0f4 Fix signature.
References for GL stuff to do:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=23
http://www.3dbuzz.com/vbforum/showthread.php?t=118279


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 20:12:01 +00:00
François Revol
c8bf21444a Fix wrong copyright.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 18:26:37 +00:00
Axel Dörfler
637c2a8557 A tiny bit more debug output when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 16:33:28 +00:00
Axel Dörfler
364759e0d2 * The "bytes" as passed to {read|write}_file_io_vec_pages() was never
initialized, causing those functions to read|write a random amount.
* This fixes bug #1614 - amazing how well the system worked with those randomly
  sized requests...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 16:28:56 +00:00
Jérôme Duval
aa42ed6ec6 fix int24 to float conversion : the formula was correct, but the sign bit of int32 doesn't help, and my ears confirmed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 15:50:11 +00:00
François Revol
98f16eeec8 A canvas for a reimplementation of the memorable 3DMov demo, this time using OpenGL and the Media Kit.
Stippi, an HVIF icon please ;)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 14:56:22 +00:00
Stephan Aßmus
a878b1d91c * remove superfluous tab
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 14:45:04 +00:00
Axel Dörfler
f0d9382047 * The previous locking order "inode write" -> "journal" was not only not
honoured (in the Inode attribute code), it also couldn't be honoured there.
  Therefore, the locking order is now reversed, that is "journal" comes first,
  then the Inode write lock. This should also help with the lock ups that
  appeared after r22886.
* Got rid of INODE_NO_TRANSACTION; it doesn't make any sense to use.
* When Inode::WriteAttribute() changed the type, the type field was actually
  never written back within the current transaction.
* If the attribute data fit into the inode again, the attribute's write lock
  was never released.
* Since r22886, Inode::ReadAt() does its own locking, so we must no longer lock
  the inode before calling it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 13:07:56 +00:00
Axel Dörfler
6edf637ba6 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 13:00:59 +00:00
Stephan Aßmus
1185d93240 * patch by vzsolt which really fixes the problem with zero byte buffers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 12:56:46 +00:00
Axel Dörfler
0d8939aea7 There is absolutely no need that the interface packet consumer runs at a
priority that high.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 12:55:22 +00:00
Stephan Aßmus
a9cde6d274 * this should cover the case where the buffer is one byte long but is _not_
a text file


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:29:07 +00:00
Stephan Aßmus
acdf38f663 * fixed a bug researched by Varadi Zsolt Gyula, if the buffer is one byte long
or empty, assume text anyways, fixes Styled Edit opening empty files (#1610)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:21:29 +00:00
Stephan Aßmus
92deda607e * removed the Styled Edit Text translator from the "CVS" package for BeOS,
since it doesn't build for BeOS


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 10:19:27 +00:00
Ryan Leavengood
0e230349da I needed nextafterf support in WebKit, so I added it here. It was already
defined in the headers. If this is not the correct way to do this, let me
know, but it seems to work (well it compiled at least.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-11 03:23:17 +00:00
Stephan Aßmus
0be6cbd37d * extract a Support.cpp/h with utility functions
* fix the problem with duplicated parent partition entries, we need to recurse
  into child rows when findig a particular BRow, or else RowAt() or CountRows()
  will only return the top level list entries
* disabled the bitmap column for now, to get a better overview of "level"
* display the device path also for partitions, not just devices


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 23:48:53 +00:00
Axel Dörfler
c98d35dc33 This might help with the build on Linux.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:46:57 +00:00
Marcus Overhagen
f668d91b37 This hopefully stops BPoligon from corrupting memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:23:04 +00:00
Axel Dörfler
3d268eda3d * Extracted file_map API out of the file cache - it's now an optional service
that can be used by file systems.
* Changed the way the file cache works: instead of reading/writing to the
  underlying device directly, it can now be used for any data source, ie.
  also network file systems.
* As a result, the former pages_io() moved to the VFS layer, and can now be
  called by a file system via {read|write}_file_io_vec_pages() (naming
  suggestions are always welcomed :-)). It now gets an FD, and uses that to
  communicate with the device (via its fs_{read|write}_pages() hooks).
* The file_cache_{read|write}() functions must now be called without holding
  an I/O relevant file system lock. That allows the file cache to prepare the
  pages without colliding with the page writer, IOW the "mayBlock" flag can
  go into the attic again (yay!).
* This also results in a much better performance when the system does I/O and
  is low on memory, as the page writer can now finally write back some pages,
  and that even without maxing out the CPU :)
* The API changes put slightly more burden on the fs_{read|write}_pages()
  hooks, but in combination with the file_map it's still pretty straight
  forward. It just will have to dispatch the call to the underlying device
  directly, usually it will just call its fs_{read|write}_pages() hooks
  via the above mentioned calls.
* Ported BFS and FAT to the new API, the latter has not been tested, though.
* Also ported the API changes to the fs_shell. I also completely removed its
  file cache level page handling - the downside is that device access is no
  longer cached (ie. depends on the host OS now), the upside is that the code
  is greatly simplified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:19:52 +00:00
Ingo Weinhold
94463f5368 Added the userland disk system add-ons to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:43:00 +00:00
Ingo Weinhold
68f73bd1e5 The API expects the disk systems' to be referred to by pretty name.
Initializing a partition with BFS works again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:38:39 +00:00
Ingo Weinhold
5ac3152dfe * Added some debug output.
* Don't generate an uninitialize job, when there's the partition wasn't
  initialized anyway (the syscall would fail in this case).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:36:30 +00:00
Ingo Weinhold
54a5f0b731 Implemented BPartition::_IsModified(), so that BDiskDevice::IsModified()
does actually work now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:33:43 +00:00
Ingo Weinhold
17fdd1f071 Initialize ref count.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:31:50 +00:00
Ingo Weinhold
c9830ce0f5 * KDiskDeviceManager::{Find,Load}DiskSystem() can also find the disk
system by pretty name (not only module name) now.
* _user_initialize_partition() loads the disk system by pretty name.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 20:30:22 +00:00
Marcus Overhagen
aee1388ada improved debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 19:15:12 +00:00
Marcus Overhagen
68cbf40298 Switch Intel AHCI controller from IDE into AHCI mode.
Clears BAR5 on ICH8 and ICH9.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 18:59:29 +00:00
Marcus Overhagen
f41613d5b2 Removed non-AHCI id. Reverts bugreport #1599 change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 18:55:57 +00:00
Marcus Overhagen
f53094e7ea fail gracefully when base address register or irq hasn't been assigned.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 18:41:24 +00:00
Salvatore Benedetto
e3677c6d3c * ups :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 18:36:56 +00:00
Marcus Overhagen
79844706c2 Propagate is-ATAPI restriction to the SCSI bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 17:47:57 +00:00
Salvatore Benedetto
a097d8c8ee * Placed underscore to private methods like ReadReg and WriteReg
* Rewrote _AllocateEndpoint
* More work in the constructor


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 17:47:03 +00:00
Ingo Weinhold
db81403db4 Beginnings of a BFS userland disk system add-on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 17:34:44 +00:00
Ingo Weinhold
57225f0367 * Moved helper function to check initialization parameters to separate
source file. Added function to check the volume name.
* Removed bfs_validate_initialize(). This functionality is to be implemented
  in a userland add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 17:33:47 +00:00
Marcus Overhagen
117c680d90 Warn when lun is not 0. Might be needed for SATA PM support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 16:49:39 +00:00
Marcus Overhagen
8d722116c2 Enable SATA ports 5 and 6 on Intel ICH8 and ICH9 based
systems, and possibly enable ports 7 and 8 in the future.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 16:25:49 +00:00
Marcus Overhagen
65621982c9 New PCI quirk/fixup support.
The Jmicron AHCI controller has a mode that combines IDE and AHCI functionality
into a single PCI device at function 0. This happens when the controller is set
in the BIOS to "basic" or "IDE" mode (but not in "RAID" or "AHCI" mode).
To avoid needing two drivers to handle a single PCI device, we switch to the
multifunction (split device) AHCI mode. This will set PCI device at function 0
to AHCI, and PCI device at function 1 to IDE controller.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 15:51:40 +00:00
Ingo Weinhold
83274b7115 Patch by Vasilis Kaoutsis: Shell script to run the POSIX conformance tests.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-09 23:36:37 +00:00
Ingo Weinhold
627c5b3f82 Patch by Vasilis Kaoutsis: Added posixtestsuite tests for sigrelse().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-09 23:27:30 +00:00
Ingo Weinhold
99ed286c94 Patch by Vasilis Kaoutsis: Implemented sigrelse().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-09 23:23:46 +00:00
Axel Dörfler
c84c58e41a Extracted file_map API for later use.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-09 17:09:54 +00:00