struct mntent mef = { "/dev/hda1", "/", "ext2", "defaults", 1, 1 }; struct mntent *mnt = &mef;  if (hasmntopt (mnt, "defaults")) printf("Found!\n"); else
struct mntent mef; struct mntent *mnt = &mef;  mef.mnt_fsname = strdupa ("/dev/hda1"); mef.mnt_dir = strdupa ("/"); mef.mnt_type = strdupa ("ext2"); mef.mnt_opts = strdupa ("defaults"); mef.mnt_freq = 1; mef.mnt_passno = 1;  if (hasmntopt (mnt, "defaults")) printf ("Found!\n"); else
main (int argc, char *argv[]) {   int result = 0;  struct mntent mef =  {      "/dev/hda1", "/", "ext2", "defaults", 1, 1   };   struct mntent *mnt = &mef;    if (hasmntopt (mnt, "defaults"))      printf("Found!\n");   else     {      printf("Didn't find it\n");       result = 1;    }      return result; } 