Print this page
const-ify make segment ops structures
There is no reason to keep the segment ops structures writable.
patch lower-case-segops
@@ -116,19 +116,19 @@
* Mappings of /dev/null come from segdev and have no mapping type.
*/
#define SEG_IS_DEVNULL_MAPPING(seg) \
((seg)->s_ops == &segdev_ops && \
- ((SEGOP_GETTYPE(seg, (seg)->s_base) & (MAP_SHARED | MAP_PRIVATE)) == 0))
+ ((segop_gettype((seg), (seg)->s_base) & (MAP_SHARED | MAP_PRIVATE)) == 0))
extern void segdev_init(void);
extern int segdev_create(struct seg *, void *);
extern int segdev_copyto(struct seg *, caddr_t, const void *, void *, size_t);
extern int segdev_copyfrom(struct seg *, caddr_t, const void *, void *, size_t);
-extern struct seg_ops segdev_ops;
+extern const struct seg_ops segdev_ops;
#endif /* _KERNEL */
#ifdef __cplusplus
}