While pipe() only supports a read end and a write end, named FIFOs
are supposed to allow opening in read/write mode (which, indeed,
is something the Fish shell seems to require.)
The code that checks open_mode in the read/write routines was introduced
all the way back in 2003 (2469f26dfc).
At that time, the VFS did not do open_mode checks on FDs in the
I/O syscalls, so these doubled as permissions checks. Now, however,
the VFS does check that in common_user_io, so we can remove these
entirely and let things behave as they should.
Additionally, there is now also no reason to prevent select()ing
on both events for the same FD independent of open_mode, so
allow that too.
Change-Id: Ib3cba76d18e91b7c00d1695e8d29dd47cae06b79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5427
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Page directory physical address must be aligned on 16K and
it must be mapped to a contiguous physical region.
Change-Id: I6723023c9deaa1c4a1081cf5a984a1766241a532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* instead try to guess the type, find the app, and launch the app with the document refs.
* fix#5783
Change-Id: Icd25a81ff28038fec0494045390edc6271433b07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5425
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... to explain hrev562209 by Jim906 which fixes#17733
StyledEdit: give initial focus to the TextView
No functional change
Change-Id: Id428290d8d3530e5ef9213489625c1968984d323
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5422
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
after hrev56221, the block bitmaps can span over multiple allocation groups.
Blocks would be allocated in the block bitmaps, especially root indexes (for instance 2.5TB, blocksize 2k).
Change-Id: I35d21d48e84945e5f949a272d530c466ae6506ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5420
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Not entirely sure if these are working as they were not really tested.
But they don't seem to cause KDLs at least, so the worst that happens
is that the WiFi devices fail to work.
Tested by nephele with a RT2573. The device starts and scans for networks,
but hits some USB errors probably related to buffer sizing which I'm
not quite sure what the cause of could be. More work (by someone who
owns these devices) may be required.
Turns out some FreeBSD drivers use these macros on types other
than the ones declared in this header and expect them to behave
as array accessors, so we really do have to keep the originals.
We already had one for High-Speed endpoints, but SuperSpeed endpoints
also have a fixed size, similar to Control endpoints.
May help with some devices failing to configure.
* Move the existing MakeFocus call to after the window layout is built.
* Also, add calls to Activate so that StyledEdit becomes the active
window after its find or replace window is closed/hidden, even if
another application is set to 'always on top.'
* Fixes#17733.
Change-Id: I8380e8ce2760ffa3f3467a618a0d843826e4ac99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5416
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This linker script was introduced in commit 5426ff9 in 2012
predating both the EFI and the raw u-boot ARM loader,
at that time it seems that it was intended to be used
as part of a 'raspberrypi_arm' boot platform which does
not exist anymore. So this is not needed anymore.
Change-Id: I530e922807fe6d80f74248f2dc7ed25cdc8bcb1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5419
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
dl_iterate_phdr now fills the first four fields of
struct dl_phdr_info. The last four fields remain
unimplemented, as it requires help from the
runtime_loader.
Change-Id: Id96a7c7ac05633a71b9fb62c98b3a40f7d4f255b
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Include only the APIs we are (shortly) going to actually support.
The other structures and functions declared in this file were
never supported nor used anywhere in Haiku's tree.
Newer versions of u-boot support EFI natively, which is what we
have been making use of instead.
There may be some use for the "native" u-boot loader still on PowerPC,
but otherwise the EFI support is much more advanced and even in u-boot
supports as or more features than "native" loaders, so there is no
reason to keep this around.
You can't initialize struct fields in the declaration in gcc2, but you
can set them up in a constructor. So made one for struct diri,
and initialize nested sub-structures too.
Change-Id: Ic8b824bc157cca4cdb8c4e41afdca596776c0d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4995
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This is needed to fix the build on arm as atomic_arch.h
relies on musl libc.h and features.h
Change-Id: I5bfa32b7b0fa1662cc9ee8cd8fa3037d8a5e2431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5418
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* The reserved blocks could exhaust the first allocation group, so iterate as much as needed.
* fix#11753
Change-Id: Ib1d7f87946f7b96dfcade8f5778a14065d965f6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5417
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
trying to load a PIE executable produced by golang show the following (for pthread_create)
12: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND pthread_create
12655: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_create
It's the same for Linux or Solaris, so I suppose we're being too picky.
Change-Id: Ibe817c231365aba8b2eb88eb3f556d2bd1db384a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5392
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
- Implemented xfs v5 inodes (known as v3 inodes) and necessary metadata integrity checks
- Implemented correct data fork pointer which handles both xfs v4 and v5 directories
- We can now read inodes and shortform directories for both xfs versions completely fine
Change-Id: I8a75ec1dc663d567d3bf6db64be4a27b55d709b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5396
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
we deny mounting read/write when not clean or with errors.
Change-Id: Ie0188319618d9d8e7199b308c007fbaeacaed87c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5400
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
my understanding is that it's possible that the last block (for instance of size 4KB)
is too large for the last few partition sectors, if the partition size isn't a multiple
of the block size.
Change-Id: I88c709d6e449aa52358fd9343c9f68f7ac1c01fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5399
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
the old code could lead to an odd head count, thus a smaller partition size.
with power of two, this works at least accurately if the size is aligned.
we should probably introduce a new ioctl or extend the current one to avoid this problem.
Change-Id: Ia6c034262b1756e901d6ad76ab17b278b2314631
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5398
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* tested read/write with a NTFS partition at the end of a 5TB USB hard disk.
* fix#14670
Change-Id: Ic005dfb7ef94b50a2d6fc8099ef5c83ec6b4a730
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5397
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
dm_segs is a flexible-length array at the end of a structure.
Taking its address with & gives the same address as using it without,
however, the types are not identical in the different cases.
This should fix some warnings about incompatibile pointer types
while not changing behavior.
It is independent of whatever heap implementation is actually in use,
so it belongs in here (even if this file is probably not the right
place for such functions in the first place.)
This allows the kernel to be built once again with things other than
the default slab heap.
Instead make FBSD_TASKQUEUES a combination flag of all taskqueues,
so that if even one is needed, the init_taskqueues function will
be invoked appropriately.
* Use FreeBSD's queue management directly, only retaining thread
creation and synchronization functions from Haiku.
* Use FreeBSD's task structure declarations.
* Use a standard non-FAST taskqueue for taskqueue_thread.
* Rewrite header and adjust consumers as appropriate.
The min/max usage was reversd from what it should be. This
would have led to the least restrictive restrictions being the
ones that were checked, instead of the most restrictive.
* Remove support for filters (again): they are deprecated in FreeBSD
and no driver we have uses them. This allows the loop in the
_validate_address function to be dropped entirely.
* Clean up parent tag handling logic.
My machine does not have an AUX/Mouse port at all. As a result, the
commands all get sent to the keyboard, which confuses the keyboard and
it eventually resets. This is generally harmless, but it ends up
resetting the keyboard, which cancels the effect of the commands to set
the repeat rate and delay during boot.
By disabling the keyboard during this step, we can avoid interference
with it.
Change-Id: Ic0513972a31e030a15577477c3d3fe32d4ce9bd3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5387
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
DT_INIT, DT_INIT_ARRAY, initialize_before, initialize_after are called before
executable entry point so __main_thread_id may be uninitalized there. It cause
getpid() to return zero if called in one of image initalizers before main().
Fixes#11797.
Change-Id: Ia745db9ffeaeb6de4dd46b868b1575d0780b54d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5254
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
The FreeBSD KPIs that we emulate expect this to be done manually,
so we have to do it before we begin doing PCI access.
Fixes firmware load failures and device initialization problems
since the introduction of the OpenBSD driver replacing the FreeBSD one.
* Nothing uses the plural forms anymore, so drop them.
* Nothing uses the "PACKAGE" field, so drop it.
Once the Marvell driver is migrated to use a package instead of the
archive, we can drop even more of this related to HAIKU_WIFI_FIRMWARE_DO_EXTRACT.