mercurial/osutil.c
changeset 31564 102f291807c9
parent 31563 cc3ec3027695
child 31597 2d501fb60b2d
equal deleted inserted replaced
31563:cc3ec3027695 31564:102f291807c9
  1077 		return "xfs";
  1077 		return "xfs";
  1078 #endif
  1078 #endif
  1079 	/* End of Linux filesystems */
  1079 	/* End of Linux filesystems */
  1080 	return NULL;
  1080 	return NULL;
  1081 }
  1081 }
       
  1082 
       
  1083 static PyObject *pygetfstype(PyObject *self, PyObject *args)
       
  1084 {
       
  1085 	const char *path = NULL;
       
  1086 	if (!PyArg_ParseTuple(args, "s", &path))
       
  1087 		return NULL;
       
  1088 
       
  1089 	const char *type = getfstype(path);
       
  1090 	if (type == NULL)
       
  1091 		Py_RETURN_NONE;
       
  1092 
       
  1093 	PyObject *result = Py_BuildValue("s", type);
       
  1094 	return result;
       
  1095 }
  1082 #endif /* def HAVE_STATFS */
  1096 #endif /* def HAVE_STATFS */
  1083 
  1097 
  1084 #endif /* ndef _WIN32 */
  1098 #endif /* ndef _WIN32 */
  1085 
  1099 
  1086 static PyObject *listdir(PyObject *self, PyObject *args, PyObject *kwargs)
  1100 static PyObject *listdir(PyObject *self, PyObject *args, PyObject *kwargs)
  1255 #endif
  1269 #endif
  1256 #ifndef SETPROCNAME_USE_NONE
  1270 #ifndef SETPROCNAME_USE_NONE
  1257 	{"setprocname", (PyCFunction)setprocname, METH_VARARGS,
  1271 	{"setprocname", (PyCFunction)setprocname, METH_VARARGS,
  1258 	 "set process title (best-effort)\n"},
  1272 	 "set process title (best-effort)\n"},
  1259 #endif
  1273 #endif
       
  1274 #ifdef HAVE_STATFS
       
  1275 	{"getfstype", (PyCFunction)pygetfstype, METH_VARARGS,
       
  1276 	 "get filesystem type (best-effort)\n"},
       
  1277 #endif
  1260 #endif /* ndef _WIN32 */
  1278 #endif /* ndef _WIN32 */
  1261 #ifdef __APPLE__
  1279 #ifdef __APPLE__
  1262 	{
  1280 	{
  1263 		"isgui", (PyCFunction)isgui, METH_NOARGS,
  1281 		"isgui", (PyCFunction)isgui, METH_NOARGS,
  1264 		"Is a CoreGraphics session available?"
  1282 		"Is a CoreGraphics session available?"