Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F11753858
Masterwork From Distant Lands
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
cem
Nov 12 2020, 11:08 PM
2020-11-12 23:08:14 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
Masterwork From Distant Lands
View Options
diff --git a/dialects/freebsd/dproc.c b/dialects/freebsd/dproc.c
index 8533265..6b66937 100644
--- a/dialects/freebsd/dproc.c
+++ b/dialects/freebsd/dproc.c
@@ -44,6 +44,9 @@ static char copyright[] =
#if __FreeBSD_version >= 1300081
#define HAS_PWD
#endif
+#if __FreeBSD_version >= 1300XXX
+#define HAS_PWDDESC
+#endif
_PROTOTYPE(static void enter_vn_text,(KA_T va, int *n));
_PROTOTYPE(static void get_kernel_access,(void));
@@ -125,6 +128,9 @@ gather_proc_info()
* streams with eXPORT data,
* where supported */
struct filedesc fd;
+#if defined(HAS_PWDDESC)
+ struct pwddesc pd;
+#endif
int i, nf;
MALLOC_S nb;
@@ -317,6 +323,12 @@ gather_proc_info()
|| kread((KA_T)p->P_FD, (char *)&fd, sizeof(fd)))
continue;
+#if defined(HAS_PWDDESC)
+ if (!p->ki_pd
+ || kread((KA_T)p->ki_pd, (char *)&pd, sizeof(pd)))
+ continue;
+#endif
+
#if defined(HAS_FDESCENTTBL)
if (!fd.fd_files
|| kread((KA_T)fd.fd_files, (char *)&fdt, sizeof(fdt)))
@@ -330,7 +342,11 @@ gather_proc_info()
#if defined(HAS_PWD)
cdir = rdir = jdir = NULL;
+#if defined(HAS_PWDDESC)
+ pwd_addr = (KA_T)PWDDESC_KVM_LOAD_PWD(&pd);
+#else
pwd_addr = (KA_T)FILEDESC_KVM_LOAD_PWD(&fd);
+#endif
if (pwd_addr != 0) {
if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) {
cdir = pwd.pwd_cdir;
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3094665
Default Alt Text
Masterwork From Distant Lands (1 KB)
Attached To
Mode
P456 Masterwork From Distant Lands
Attached
Detach File
Event Timeline
Log In to Comment