/* DF-3078 trigger: MNT_RELOAD on a mounted-RDONLY UFS fs.
 * usage: reload /mnt/rt
 * data = zeroed buffer >= sizeof(struct ufs_args); fspec==NULL => pure update path.
 */
#include <sys/param.h>
#include <sys/mount.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv){
    static char databuf[512];
    int flags = MNT_UPDATE | MNT_RELOAD | MNT_RDONLY;
    int rc;
    if (argc < 2) { fprintf(stderr, "usage: reload /mountpoint\n"); return 2; }
    memset(databuf, 0, sizeof databuf);
    rc = mount("ufs", argv[1], flags, databuf);
    if (rc) { perror("mount"); return 1; }
    printf("RELOAD RETURNED\n");
    return 0;
}
