Skip to content

Commit

Permalink
sysdeps/managarm: Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke committed Jan 21, 2025
1 parent 3c18eaf commit 82eca57
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions sysdeps/managarm/generic/drm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,12 @@ int ioctl_drm(int fd, unsigned long request, void *arg, int *result, HelHandle h
<< frg::endlog;
return 0;
}
case DRM_IOCTL_WAIT_VBLANK: {
mlibc::infoLogger() << "\e[35mmlibc: DRM_IOCTL_WAIT_VBLANK"
" is a noop\e[39m"
<< frg::endlog;
return 0;
}
case DRM_IOCTL_PRIME_HANDLE_TO_FD: {
auto param = reinterpret_cast<drm_prime_handle *>(arg);

Expand Down
1 change: 1 addition & 0 deletions sysdeps/managarm/generic/ioctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/sockios.h>
#include <linux/usb/cdc-wdm.h>
#include <linux/vt.h>
#include <scsi/sg.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/in.h>
Expand Down
6 changes: 3 additions & 3 deletions sysdeps/managarm/generic/mount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ sys_mount(const char *source, const char *target, const char *fstype, unsigned l
SignalGuard sguard;

managarm::posix::MountRequest<MemoryAllocator> req(getSysdepsAllocator());
req.set_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), source));
req.set_target_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), target));
req.set_fs_type(frg::string<MemoryAllocator>(getSysdepsAllocator(), fstype));
req.set_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), source ? source : ""));
req.set_target_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), target ? target : ""));
req.set_fs_type(frg::string<MemoryAllocator>(getSysdepsAllocator(), fstype ? fstype : ""));

auto [offer, send_head, send_tail, recv_resp] = exchangeMsgsSync(
getPosixLane(),
Expand Down
10 changes: 10 additions & 0 deletions sysdeps/managarm/generic/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,16 @@ int sys_setsockopt(int fd, int layer, int number, const void *buffer, socklen_t
) << "\e[31mmlibc: setsockopt() call with SOL_SOCKET and SO_RCVTIMEO is unimplemented\e[39m"
<< frg::endlog;
return 0;
} else if (layer == SOL_SOCKET && number == SO_PASSSEC) {
mlibc::infoLogger(
) << "\e[31mmlibc: setsockopt() call with SOL_SOCKET and SO_PASSSEC is unimplemented\e[39m"
<< frg::endlog;
return ENOSYS;
} else if (layer == SOL_SOCKET && number == SO_TIMESTAMP) {
mlibc::infoLogger(
) << "\e[31mmlibc: setsockopt() call with SOL_SOCKET and SO_TIMESTAMP is unimplemented\e[39m"
<< frg::endlog;
return 0;
} else {
mlibc::panicLogger() << "\e[31mmlibc: Unexpected setsockopt() call, layer: " << layer
<< " number: " << number << "\e[39m" << frg::endlog;
Expand Down

0 comments on commit 82eca57

Please sign in to comment.